Skip to main content

incus_client/models/
instance_snapshot_post.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 InstanceSnapshotPost {
16    /// Whether to perform a live migration (requires migration)
17    #[serde(rename = "live", skip_serializing_if = "Option::is_none")]
18    pub live: Option<bool>,
19    /// Whether this is a migration request
20    #[serde(rename = "migration", skip_serializing_if = "Option::is_none")]
21    pub migration: Option<bool>,
22    /// New name for the snapshot
23    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
24    pub name: Option<String>,
25    #[serde(rename = "target", skip_serializing_if = "Option::is_none")]
26    pub target: Option<Box<models::InstancePostTarget>>,
27}
28
29impl InstanceSnapshotPost {
30    pub fn new() -> InstanceSnapshotPost {
31        InstanceSnapshotPost {
32            live: None,
33            migration: None,
34            name: None,
35            target: None,
36        }
37    }
38}
39