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
57
58
59
60
61
62
63
64
65
/*
* Incus external REST API
*
* 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.
*
* The version of the OpenAPI document: 1.0
* Contact: lxc-devel@lists.linuxcontainers.org
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// Server : Server represents a server configuration
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Server {
/// List of supported API extensions
#[serde(rename = "api_extensions", skip_serializing_if = "Option::is_none")]
pub api_extensions: Option<Vec<String>>,
/// Support status of the current API (one of \"devel\", \"stable\" or \"deprecated\")
#[serde(rename = "api_status", skip_serializing_if = "Option::is_none")]
pub api_status: Option<String>,
/// API version number
#[serde(rename = "api_version", skip_serializing_if = "Option::is_none")]
pub api_version: Option<String>,
/// Whether the client is trusted (one of \"trusted\" or \"untrusted\")
#[serde(rename = "auth", skip_serializing_if = "Option::is_none")]
pub auth: Option<String>,
/// List of supported authentication methods
#[serde(rename = "auth_methods", skip_serializing_if = "Option::is_none")]
pub auth_methods: Option<Vec<String>>,
/// The current API user login method
#[serde(rename = "auth_user_method", skip_serializing_if = "Option::is_none")]
pub auth_user_method: Option<String>,
/// The current API user identifier
#[serde(rename = "auth_user_name", skip_serializing_if = "Option::is_none")]
pub auth_user_name: Option<String>,
/// Server configuration map (refer to doc/server.md)
#[serde(rename = "config", skip_serializing_if = "Option::is_none")]
pub config: Option<serde_json::Value>,
#[serde(rename = "environment", skip_serializing_if = "Option::is_none")]
pub environment: Option<Box<models::ServerEnvironment>>,
/// Whether the server is public-only (only public endpoints are implemented)
#[serde(rename = "public", skip_serializing_if = "Option::is_none")]
pub public: Option<bool>,
}
impl Server {
/// Server represents a server configuration
pub fn new() -> Server {
Server {
api_extensions: None,
api_status: None,
api_version: None,
auth: None,
auth_methods: None,
auth_user_method: None,
auth_user_name: None,
config: None,
environment: None,
public: None,
}
}
}