hanzo_client/models/node_pool_view.rs
1/*
2 * Hanzo Cloud API
3 *
4 * 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/.
5 *
6 * The version of the OpenAPI document: v1
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct NodePoolView {
16 /// AutoScale reports whether the provider's cluster autoscaler owns this pool's size, moving Count between MinNodes and MaxNodes as workloads demand. False means Count changes only when someone scales the pool.
17 #[serde(rename = "autoScale", skip_serializing_if = "Option::is_none")]
18 pub auto_scale: Option<bool>,
19 /// Count is how many nodes the pool has right now. Always present, so 0 means a pool that is genuinely empty rather than a figure the provider withheld.
20 #[serde(rename = "count", skip_serializing_if = "Option::is_none")]
21 pub count: Option<i32>,
22 /// MaxNodes is the ceiling the autoscaler will not grow the pool past, and so the bound on what this pool can cost. Read it only with AutoScale set.
23 #[serde(rename = "maxNodes", skip_serializing_if = "Option::is_none")]
24 pub max_nodes: Option<i32>,
25 /// MinNodes is the floor the autoscaler will not shrink the pool below. Read it only with AutoScale set — the provider ignores it otherwise.
26 #[serde(rename = "minNodes", skip_serializing_if = "Option::is_none")]
27 pub min_nodes: Option<i32>,
28 /// Name is the pool's name as the provider knows it.
29 #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
30 pub name: Option<String>,
31 /// PoolID is the provider's id for the pool — the value the scale and delete routes address it by. It falls back to the pool's name when the provider answered without one, so it is always something the routes accept.
32 #[serde(rename = "poolId", skip_serializing_if = "Option::is_none")]
33 pub pool_id: Option<String>,
34 /// Size is the provider size slug every node in the pool runs at (\"s-4vcpu-8gb\", \"gpu-h100x8-640gb\"). One pool is one size — a mixed cluster is several pools.
35 #[serde(rename = "size", skip_serializing_if = "Option::is_none")]
36 pub size: Option<String>,
37}
38
39impl NodePoolView {
40 pub fn new() -> NodePoolView {
41 NodePoolView {
42 auto_scale: None,
43 count: None,
44 max_nodes: None,
45 min_nodes: None,
46 name: None,
47 pool_id: None,
48 size: None,
49 }
50 }
51}
52