incus-client 0.1.1

Auto-generated Rust client for the Incus container and VM manager REST API
Documentation
/*
 * 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,
        }
    }
}