Skip to main content

incus_client/models/
instance_backups_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 InstanceBackupsPost {
16    /// What compression algorithm to use
17    #[serde(rename = "compression_algorithm", skip_serializing_if = "Option::is_none")]
18    pub compression_algorithm: Option<String>,
19    /// When the backup expires (gets auto-deleted)
20    #[serde(rename = "expires_at", skip_serializing_if = "Option::is_none")]
21    pub expires_at: Option<chrono::DateTime<chrono::FixedOffset>>,
22    /// Whether to ignore snapshots
23    #[serde(rename = "instance_only", skip_serializing_if = "Option::is_none")]
24    pub instance_only: Option<bool>,
25    /// Backup name
26    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
27    pub name: Option<String>,
28    /// Whether to use a pool-optimized binary format (instead of plain tarball)
29    #[serde(rename = "optimized_storage", skip_serializing_if = "Option::is_none")]
30    pub optimized_storage: Option<bool>,
31    /// Whether to ignore dependent volumes
32    #[serde(rename = "root_only", skip_serializing_if = "Option::is_none")]
33    pub root_only: Option<bool>,
34    #[serde(rename = "target", skip_serializing_if = "Option::is_none")]
35    pub target: Option<Box<models::BackupTarget>>,
36}
37
38impl InstanceBackupsPost {
39    pub fn new() -> InstanceBackupsPost {
40        InstanceBackupsPost {
41            compression_algorithm: None,
42            expires_at: None,
43            instance_only: None,
44            name: None,
45            optimized_storage: None,
46            root_only: None,
47            target: None,
48        }
49    }
50}
51