Skip to main content

incus_client/models/
server.rs

1/*
2 * Incus external REST API
3 *
4 * This is the REST API used by all Incus clients. Internal endpoints aren't included in this documentation.  The Incus API is available over both a local unix+http and remote https API. Authentication for local users relies on group membership and access to the unix socket. For remote users, the default authentication method is TLS client certificates.
5 *
6 * The version of the OpenAPI document: 1.0
7 * Contact: lxc-devel@lists.linuxcontainers.org
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Server : Server represents a server configuration
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Server {
17    /// List of supported API extensions
18    #[serde(rename = "api_extensions", skip_serializing_if = "Option::is_none")]
19    pub api_extensions: Option<Vec<String>>,
20    /// Support status of the current API (one of \"devel\", \"stable\" or \"deprecated\")
21    #[serde(rename = "api_status", skip_serializing_if = "Option::is_none")]
22    pub api_status: Option<String>,
23    /// API version number
24    #[serde(rename = "api_version", skip_serializing_if = "Option::is_none")]
25    pub api_version: Option<String>,
26    /// Whether the client is trusted (one of \"trusted\" or \"untrusted\")
27    #[serde(rename = "auth", skip_serializing_if = "Option::is_none")]
28    pub auth: Option<String>,
29    /// List of supported authentication methods
30    #[serde(rename = "auth_methods", skip_serializing_if = "Option::is_none")]
31    pub auth_methods: Option<Vec<String>>,
32    /// The current API user login method
33    #[serde(rename = "auth_user_method", skip_serializing_if = "Option::is_none")]
34    pub auth_user_method: Option<String>,
35    /// The current API user identifier
36    #[serde(rename = "auth_user_name", skip_serializing_if = "Option::is_none")]
37    pub auth_user_name: Option<String>,
38    /// Server configuration map (refer to doc/server.md)
39    #[serde(rename = "config", skip_serializing_if = "Option::is_none")]
40    pub config: Option<serde_json::Value>,
41    #[serde(rename = "environment", skip_serializing_if = "Option::is_none")]
42    pub environment: Option<Box<models::ServerEnvironment>>,
43    /// Whether the server is public-only (only public endpoints are implemented)
44    #[serde(rename = "public", skip_serializing_if = "Option::is_none")]
45    pub public: Option<bool>,
46}
47
48impl Server {
49    /// Server represents a server configuration
50    pub fn new() -> Server {
51        Server {
52            api_extensions: None,
53            api_status: None,
54            api_version: None,
55            auth: None,
56            auth_methods: None,
57            auth_user_method: None,
58            auth_user_name: None,
59            config: None,
60            environment: None,
61            public: None,
62        }
63    }
64}
65