pub struct UnstableCreateEvaluationRuleRequest {
pub name: String,
pub evaluator: Box<UnstableEvaluationRuleEvaluatorReference>,
pub target: UnstableEvaluationRuleTarget,
pub enabled: bool,
pub sampling: Option<Option<f64>>,
pub filter: Option<Option<Vec<UnstableEvaluationRuleFilter>>>,
pub mapping: Vec<UnstableEvaluationRuleMapping>,
}Expand description
UnstableCreateEvaluationRuleRequest : Request body for creating an evaluation rule. Checklist for agents and SDK clients: - reference an existing evaluator family by evaluator.name and evaluator.scope - choose target=observation or target=experiment - if target=experiment and you want a dataset filter, call GET /api/public/v2/datasets first and use dataset id values in filter[].value - fetch or inspect the evaluator first, then provide a complete variable mapping for every evaluator variable listed in variables - optionally narrow execution with filter - set enabled=true only when you want live execution immediately
Fields§
§name: StringHuman-readable deployment name.
evaluator: Box<UnstableEvaluationRuleEvaluatorReference>§target: UnstableEvaluationRuleTarget§enabled: boolWhether the deployment should be active immediately after creation.
sampling: Option<Option<f64>>Optional sampling fraction. Defaults to 1.
filter: Option<Option<Vec<UnstableEvaluationRuleFilter>>>Optional filter list. Omit or pass an empty list to evaluate all matching targets for the selected target. Each filter object must use a column that is valid for that target. For target=experiment, column=datasetId expects dataset id values from GET /api/public/v2/datasets, not dataset names.
mapping: Vec<UnstableEvaluationRuleMapping>Required variable mappings. Every evaluator variable must appear exactly once. Build this list from the evaluator variables array returned by the evaluator endpoints.
Implementations§
Source§impl UnstableCreateEvaluationRuleRequest
impl UnstableCreateEvaluationRuleRequest
Sourcepub fn builder() -> UnstableCreateEvaluationRuleRequestBuilder
pub fn builder() -> UnstableCreateEvaluationRuleRequestBuilder
Create an instance of UnstableCreateEvaluationRuleRequest using the builder syntax
Source§impl UnstableCreateEvaluationRuleRequest
impl UnstableCreateEvaluationRuleRequest
Sourcepub fn new(
name: String,
evaluator: UnstableEvaluationRuleEvaluatorReference,
target: UnstableEvaluationRuleTarget,
enabled: bool,
mapping: Vec<UnstableEvaluationRuleMapping>,
) -> UnstableCreateEvaluationRuleRequest
pub fn new( name: String, evaluator: UnstableEvaluationRuleEvaluatorReference, target: UnstableEvaluationRuleTarget, enabled: bool, mapping: Vec<UnstableEvaluationRuleMapping>, ) -> UnstableCreateEvaluationRuleRequest
Request body for creating an evaluation rule. Checklist for agents and SDK clients: - reference an existing evaluator family by evaluator.name and evaluator.scope - choose target=observation or target=experiment - if target=experiment and you want a dataset filter, call GET /api/public/v2/datasets first and use dataset id values in filter[].value - fetch or inspect the evaluator first, then provide a complete variable mapping for every evaluator variable listed in variables - optionally narrow execution with filter - set enabled=true only when you want live execution immediately
Trait Implementations§
Source§impl Clone for UnstableCreateEvaluationRuleRequest
impl Clone for UnstableCreateEvaluationRuleRequest
Source§fn clone(&self) -> UnstableCreateEvaluationRuleRequest
fn clone(&self) -> UnstableCreateEvaluationRuleRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for UnstableCreateEvaluationRuleRequest
impl Default for UnstableCreateEvaluationRuleRequest
Source§fn default() -> UnstableCreateEvaluationRuleRequest
fn default() -> UnstableCreateEvaluationRuleRequest
Source§impl<'de> Deserialize<'de> for UnstableCreateEvaluationRuleRequest
impl<'de> Deserialize<'de> for UnstableCreateEvaluationRuleRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for UnstableCreateEvaluationRuleRequest
impl PartialEq for UnstableCreateEvaluationRuleRequest
Source§fn eq(&self, other: &UnstableCreateEvaluationRuleRequest) -> bool
fn eq(&self, other: &UnstableCreateEvaluationRuleRequest) -> bool
self and other values to be equal, and is used by ==.