incus_client/models/server_untrusted.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/// ServerUntrusted : ServerUntrusted represents a server configuration for an untrusted client
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ServerUntrusted {
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 /// Server configuration map (refer to doc/server.md)
33 #[serde(rename = "config", skip_serializing_if = "Option::is_none")]
34 pub config: Option<serde_json::Value>,
35 /// Whether the server is public-only (only public endpoints are implemented)
36 #[serde(rename = "public", skip_serializing_if = "Option::is_none")]
37 pub public: Option<bool>,
38}
39
40impl ServerUntrusted {
41 /// ServerUntrusted represents a server configuration for an untrusted client
42 pub fn new() -> ServerUntrusted {
43 ServerUntrusted {
44 api_extensions: None,
45 api_status: None,
46 api_version: None,
47 auth: None,
48 auth_methods: None,
49 config: None,
50 public: None,
51 }
52 }
53}
54