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
/*
* 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 PatchTargetIn {
/// Capacity rewrites the human summary, up to 256 characters. \"\" clears it.
#[serde(rename = "capacity", skip_serializing_if = "Option::is_none")]
pub capacity: Option<String>,
/// Host re-points the hostname sessions are matched by. Moving it moves the load: the session counts follow the new name from the next read.
#[serde(rename = "host", skip_serializing_if = "Option::is_none")]
pub host: Option<String>,
/// ID is the target to update, from the path.
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
/// Kind re-files it under laptop | cloud | gpu | cluster | machine.
#[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
pub kind: Option<String>,
/// Label renames the machine, up to 128 characters. Empty STRING is refused — a target with no name is a row nobody can pick out of a fleet.
#[serde(rename = "label", skip_serializing_if = "Option::is_none")]
pub label: Option<String>,
/// Metrics replaces the live sample, and sending one IS A HEARTBEAT: the server stamps the time and appends the point to the fleet series. Sending an all-zero sample CLEARS the heartbeat — the machine goes back to having no liveness fact at all, and its stored status is taken at face value again.
#[serde(rename = "metrics", skip_serializing_if = "Option::is_none")]
pub metrics: Option<Box<models::Metrics>>,
/// Spec replaces the static capability whole, sanitized and clamped the same way a register's is.
#[serde(rename = "spec", skip_serializing_if = "Option::is_none")]
pub spec: Option<Box<models::Spec>>,
/// Status sets operator INTENT: online | offline | draining. Draining is how a machine is taken out of dispatch without ending what is already on it. What comes back may still read offline, because the heartbeat outranks the intent.
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
impl PatchTargetIn {
pub fn new() -> PatchTargetIn {
PatchTargetIn {
capacity: None,
host: None,
id: None,
kind: None,
label: None,
metrics: None,
spec: None,
status: None,
}
}
}