Skip to main content

incus_client/models/
instance_backup.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 InstanceBackup {
16    /// When the backup was created
17    #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
18    pub created_at: Option<chrono::DateTime<chrono::FixedOffset>>,
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}
32
33impl InstanceBackup {
34    pub fn new() -> InstanceBackup {
35        InstanceBackup {
36            created_at: None,
37            expires_at: None,
38            instance_only: None,
39            name: None,
40            optimized_storage: None,
41        }
42    }
43}
44