1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* 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,
}
}
}