hanzo_client/models/patch_target_in.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 PatchTargetIn {
16 /// Capacity rewrites the human summary, up to 256 characters. \"\" clears it.
17 #[serde(rename = "capacity", skip_serializing_if = "Option::is_none")]
18 pub capacity: Option<String>,
19 /// 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.
20 #[serde(rename = "host", skip_serializing_if = "Option::is_none")]
21 pub host: Option<String>,
22 /// ID is the target to update, from the path.
23 #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
24 pub id: Option<String>,
25 /// Kind re-files it under laptop | cloud | gpu | cluster | machine.
26 #[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
27 pub kind: Option<String>,
28 /// 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.
29 #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
30 pub label: Option<String>,
31 /// 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.
32 #[serde(rename = "metrics", skip_serializing_if = "Option::is_none")]
33 pub metrics: Option<Box<models::Metrics>>,
34 /// Spec replaces the static capability whole, sanitized and clamped the same way a register's is.
35 #[serde(rename = "spec", skip_serializing_if = "Option::is_none")]
36 pub spec: Option<Box<models::Spec>>,
37 /// 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.
38 #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
39 pub status: Option<String>,
40}
41
42impl PatchTargetIn {
43 pub fn new() -> PatchTargetIn {
44 PatchTargetIn {
45 capacity: None,
46 host: None,
47 id: None,
48 kind: None,
49 label: None,
50 metrics: None,
51 spec: None,
52 status: None,
53 }
54 }
55}
56