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 ScoreConfigReq {
    /// Categories is the closed set of labels a CATEGORICAL score may carry. A CATEGORICAL rubric with none is refused.
    #[serde(rename = "categories", skip_serializing_if = "Option::is_none")]
    pub categories: Option<Vec<String>>,
    /// DataType is NUMERIC (the default), CATEGORICAL or BOOLEAN.
    #[serde(rename = "dataType", skip_serializing_if = "Option::is_none")]
    pub data_type: Option<String>,
    /// MaxValue is the inclusive ceiling a NUMERIC score must stay under, finite.
    #[serde(rename = "maxValue", skip_serializing_if = "Option::is_none")]
    pub max_value: Option<f64>,
    /// MinValue is the inclusive floor a NUMERIC score must clear. It must be finite and must not exceed MaxValue.
    #[serde(rename = "minValue", skip_serializing_if = "Option::is_none")]
    pub min_value: Option<f64>,
    /// Name is the score name this rubric governs, matching ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$. The name is the key, so re-posting one replaces its rules.
    #[serde(rename = "name")]
    pub name: String,
}

impl ScoreConfigReq {
    pub fn new(name: String) -> ScoreConfigReq {
        ScoreConfigReq {
            categories: None,
            data_type: None,
            max_value: None,
            min_value: None,
            name,
        }
    }
}