Skip to main content

incus_client/models/
instance_put.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct InstancePut {
16    /// Architecture name
17    #[serde(rename = "architecture", skip_serializing_if = "Option::is_none")]
18    pub architecture: Option<String>,
19    /// Instance configuration (see doc/instances.md)
20    #[serde(rename = "config", skip_serializing_if = "Option::is_none")]
21    pub config: Option<serde_json::Value>,
22    /// Instance description
23    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
24    pub description: Option<String>,
25    /// Instance devices (see doc/instances.md)
26    #[serde(rename = "devices", skip_serializing_if = "Option::is_none")]
27    pub devices: Option<serde_json::Value>,
28    /// Whether only the instances disk should be restored
29    #[serde(rename = "disk_only", skip_serializing_if = "Option::is_none")]
30    pub disk_only: Option<bool>,
31    /// Whether the instance is ephemeral (deleted on shutdown)
32    #[serde(rename = "ephemeral", skip_serializing_if = "Option::is_none")]
33    pub ephemeral: Option<bool>,
34    /// List of profiles applied to the instance
35    #[serde(rename = "profiles", skip_serializing_if = "Option::is_none")]
36    pub profiles: Option<Vec<String>>,
37    /// If set, instance will be restored to the provided snapshot name
38    #[serde(rename = "restore", skip_serializing_if = "Option::is_none")]
39    pub restore: Option<String>,
40    /// Whether the instance currently has saved state on disk
41    #[serde(rename = "stateful", skip_serializing_if = "Option::is_none")]
42    pub stateful: Option<bool>,
43}
44
45impl InstancePut {
46    pub fn new() -> InstancePut {
47        InstancePut {
48            architecture: None,
49            config: None,
50            description: None,
51            devices: None,
52            disk_only: None,
53            ephemeral: None,
54            profiles: None,
55            restore: None,
56            stateful: None,
57        }
58    }
59}
60