Skip to main content

hanzo_client/models/
bot_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 BotView {
16    /// Agent is the cloud Agent this machine runs, lifted out of the binding so a list of bots reads without following one. Empty means the machine is a bot machine with nothing bound — it costs money and answers nothing.
17    #[serde(rename = "agent", skip_serializing_if = "Option::is_none")]
18    pub agent: Option<String>,
19    /// Binding is the record joining this machine to that agent, carrying vm's own reconciled status and its reason. Absent means no runtime is bound, which is also what a stopped bot looks like: stopping unbinds and leaves the machine running.
20    #[serde(rename = "binding", skip_serializing_if = "Option::is_none")]
21    pub binding: Option<Box<models::AgentBinding>>,
22    #[serde(rename = "createdTime", skip_serializing_if = "Option::is_none")]
23    pub created_time: Option<String>,
24    #[serde(rename = "gpu", skip_serializing_if = "Option::is_none")]
25    pub gpu: Option<String>,
26    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
27    pub id: Option<String>,
28    #[serde(rename = "image", skip_serializing_if = "Option::is_none")]
29    pub image: Option<String>,
30    #[serde(rename = "mem", skip_serializing_if = "Option::is_none")]
31    pub mem: Option<String>,
32    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
33    pub name: Option<String>,
34    #[serde(rename = "os", skip_serializing_if = "Option::is_none")]
35    pub os: Option<String>,
36    #[serde(rename = "privateIp", skip_serializing_if = "Option::is_none")]
37    pub private_ip: Option<String>,
38    #[serde(rename = "provider", skip_serializing_if = "Option::is_none")]
39    pub provider: Option<String>,
40    #[serde(rename = "publicIp", skip_serializing_if = "Option::is_none")]
41    pub public_ip: Option<String>,
42    #[serde(rename = "region", skip_serializing_if = "Option::is_none")]
43    pub region: Option<String>,
44    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
45    pub status: Option<String>,
46    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
47    pub r#type: Option<String>,
48    #[serde(rename = "vcpu", skip_serializing_if = "Option::is_none")]
49    pub vcpu: Option<i32>,
50}
51
52impl BotView {
53    pub fn new() -> BotView {
54        BotView {
55            agent: None,
56            binding: None,
57            created_time: None,
58            gpu: None,
59            id: None,
60            image: None,
61            mem: None,
62            name: None,
63            os: None,
64            private_ip: None,
65            provider: None,
66            public_ip: None,
67            region: None,
68            status: None,
69            r#type: None,
70            vcpu: None,
71        }
72    }
73}
74