Skip to main content

hcloud/models/
snapshot_stats.rs

1/*
2 * Hetzner Cloud API
3 *
4 * Copied from the official API documentation for the Public Hetzner Cloud.
5 *
6 * The version of the OpenAPI document: 4b3f595
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// SnapshotStats : Statistics of the Storage Box Snapshot.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct SnapshotStats {
17    /// Current storage requirements of the Snapshot in bytes.
18    #[serde(rename = "size")]
19    pub size: i64,
20    /// Size of the compressed file system contained in the Snapshot in bytes.
21    #[serde(rename = "size_filesystem")]
22    pub size_filesystem: i64,
23}
24
25impl SnapshotStats {
26    /// Statistics of the Storage Box Snapshot.
27    pub fn new(size: i64, size_filesystem: i64) -> SnapshotStats {
28        SnapshotStats {
29            size,
30            size_filesystem,
31        }
32    }
33}