harbor_api/models/
instance.rs

1/*
2 * Harbor API
3 *
4 * These APIs provide services for manipulating Harbor project.
5 *
6 * The version of the OpenAPI document: 2.0
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 Instance {
16    /// Unique ID
17    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
18    pub id: Option<i32>,
19    /// Instance name
20    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
21    pub name: Option<String>,
22    /// Description of instance
23    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
24    pub description: Option<String>,
25    /// Based on which driver, identified by ID
26    #[serde(rename = "vendor", skip_serializing_if = "Option::is_none")]
27    pub vendor: Option<String>,
28    /// The service endpoint of this instance
29    #[serde(rename = "endpoint", skip_serializing_if = "Option::is_none")]
30    pub endpoint: Option<String>,
31    /// The authentication way supported
32    #[serde(rename = "auth_mode", skip_serializing_if = "Option::is_none")]
33    pub auth_mode: Option<String>,
34    /// The auth credential data if exists
35    #[serde(rename = "auth_info", skip_serializing_if = "Option::is_none")]
36    pub auth_info: Option<std::collections::HashMap<String, String>>,
37    /// The health status
38    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
39    pub status: Option<String>,
40    /// Whether the instance is activated or not
41    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
42    pub enabled: Option<bool>,
43    /// Whether the instance is default or not
44    #[serde(rename = "default", skip_serializing_if = "Option::is_none")]
45    pub default: Option<bool>,
46    /// Whether the instance endpoint is insecure or not
47    #[serde(rename = "insecure", skip_serializing_if = "Option::is_none")]
48    pub insecure: Option<bool>,
49    /// The timestamp of instance setting up
50    #[serde(rename = "setup_timestamp", skip_serializing_if = "Option::is_none")]
51    pub setup_timestamp: Option<i64>,
52}
53
54impl Instance {
55    pub fn new() -> Instance {
56        Instance {
57            id: None,
58            name: None,
59            description: None,
60            vendor: None,
61            endpoint: None,
62            auth_mode: None,
63            auth_info: None,
64            status: None,
65            enabled: None,
66            default: None,
67            insecure: None,
68            setup_timestamp: None,
69        }
70    }
71}
72