hanzo_client/models/pool_create.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 PoolCreate {
16 /// AutoScale turns the provider's cluster autoscaler on for this pool.
17 #[serde(rename = "autoScale", skip_serializing_if = "Option::is_none")]
18 pub auto_scale: Option<bool>,
19 /// ClusterID is the cluster to add the pool to, from the URL path.
20 #[serde(rename = "clusterId", skip_serializing_if = "Option::is_none")]
21 pub cluster_id: Option<String>,
22 /// Count is how many nodes the pool starts with.
23 #[serde(rename = "count", skip_serializing_if = "Option::is_none")]
24 pub count: Option<i32>,
25 /// MaxNodes is the ceiling the autoscaler may not grow the pool past, and so the bound on what this pool can spend. Ignored unless AutoScale is set.
26 #[serde(rename = "maxNodes", skip_serializing_if = "Option::is_none")]
27 pub max_nodes: Option<i32>,
28 /// MinNodes is the floor the autoscaler may not shrink the pool below. Ignored unless AutoScale is set.
29 #[serde(rename = "minNodes", skip_serializing_if = "Option::is_none")]
30 pub min_nodes: Option<i32>,
31 /// Name is the pool's name.
32 #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
33 pub name: Option<String>,
34 /// Provider is the cloud the cluster lives on (e.g. \"digitalocean\"). Required — Visor routes the create by it. Accepted from the body or ?provider=.
35 #[serde(rename = "provider", skip_serializing_if = "Option::is_none")]
36 pub provider: Option<String>,
37 /// Size is the provider size slug for each node (e.g. \"s-4vcpu-8gb\").
38 #[serde(rename = "size", skip_serializing_if = "Option::is_none")]
39 pub size: Option<String>,
40}
41
42impl PoolCreate {
43 pub fn new() -> PoolCreate {
44 PoolCreate {
45 auto_scale: None,
46 cluster_id: None,
47 count: None,
48 max_nodes: None,
49 min_nodes: None,
50 name: None,
51 provider: None,
52 size: None,
53 }
54 }
55}
56