hanzo-client 8.5.156

Generated client for the Hanzo API — every service, one crate.
Documentation
/*
 * Hanzo Cloud API
 *
 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
 *
 * The version of the OpenAPI document: v1
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Trial {
    /// when it started assigning
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
    /// the credential that registered it
    #[serde(rename = "createdBy", skip_serializing_if = "Option::is_none")]
    pub created_by: Option<String>,
    /// when the promotion took effect
    #[serde(rename = "decidedAt", skip_serializing_if = "Option::is_none")]
    pub decided_at: Option<String>,
    /// the credential that promoted the winner
    #[serde(rename = "decidedBy", skip_serializing_if = "Option::is_none")]
    pub decided_by: Option<String>,
    /// the event that enrols a subject — the analysis denominator
    #[serde(rename = "exposureEvent", skip_serializing_if = "Option::is_none")]
    pub exposure_event: Option<String>,
    /// the assignment flag this experiment drives
    #[serde(rename = "flagKey", skip_serializing_if = "Option::is_none")]
    pub flag_key: Option<String>,
    /// the experiment's slug, unique within the project
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// the event that counts as a conversion — the numerator
    #[serde(rename = "metricEvent", skip_serializing_if = "Option::is_none")]
    pub metric_event: Option<String>,
    /// free text for a reader
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// the sub-scope within the org, stamped from the principal
    #[serde(rename = "project", skip_serializing_if = "Option::is_none")]
    pub project: Option<String>,
    /// running while it assigns and measures, decided once a winner is promoted
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
    /// the unit assigned and measured: user, org, session or audience
    #[serde(rename = "subjectKind", skip_serializing_if = "Option::is_none")]
    pub subject_kind: Option<String>,
    /// the arms, weighted, one of them the control
    #[serde(rename = "variants", skip_serializing_if = "Option::is_none")]
    pub variants: Option<Vec<models::Arm>>,
    /// the arm promoted to the whole rollout
    #[serde(rename = "winner", skip_serializing_if = "Option::is_none")]
    pub winner: Option<String>,
}

impl Trial {
    pub fn new() -> Trial {
        Trial {
            created_at: None,
            created_by: None,
            decided_at: None,
            decided_by: None,
            exposure_event: None,
            flag_key: None,
            id: None,
            metric_event: None,
            name: None,
            project: None,
            status: None,
            subject_kind: None,
            variants: None,
            winner: None,
        }
    }
}