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 RunReq {
    /// Env is the run's environment. Keys must match `^[A-Za-z_][A-Za-z0-9_]*$`; a variable marked `secret: true` is sealed into KMS.
    #[serde(rename = "env", skip_serializing_if = "Option::is_none")]
    pub env: Option<Vec<models::EnvVarJson>>,
    /// GPU is how many GPUs the run asks for; a negative value is 400.
    #[serde(rename = "gpu", skip_serializing_if = "Option::is_none")]
    pub gpu: Option<i32>,
    /// Image is the container image to run. Required.
    #[serde(rename = "image", skip_serializing_if = "Option::is_none")]
    pub image: Option<String>,
    /// MaxScale above the floor declares an autoscaling ceiling; 0 means no autoscaler at all — a fixed run at the floor.
    #[serde(rename = "maxScale", skip_serializing_if = "Option::is_none")]
    pub max_scale: Option<i32>,
    /// MinScale is the replica floor, clamped to the deployment's limit.
    #[serde(rename = "minScale", skip_serializing_if = "Option::is_none")]
    pub min_scale: Option<i32>,
    /// Name is the run's name, and the slug is derived from it. Required, and it must resolve to `^[a-z0-9]([a-z0-9-]{0,38}[a-z0-9])?$`. Re-running the same name updates that run in place.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Port is the container port the run listens on.
    #[serde(rename = "port", skip_serializing_if = "Option::is_none")]
    pub port: Option<i32>,
    /// Runtime is accepted for the client contract and echoed nowhere: the image IS the runtime unit.
    #[serde(rename = "runtime", skip_serializing_if = "Option::is_none")]
    pub runtime: Option<String>,
    /// Shape is a compute size label, echoed back; sizing is the operator's default. Defaults to \"auto\".
    #[serde(rename = "shape", skip_serializing_if = "Option::is_none")]
    pub shape: Option<String>,
}

impl RunReq {
    pub fn new() -> RunReq {
        RunReq {
            env: None,
            gpu: None,
            image: None,
            max_scale: None,
            min_scale: None,
            name: None,
            port: None,
            runtime: None,
            shape: None,
        }
    }
}