ory_client_client/models/
volume_usage_data.rs

1/*
2 * Ory APIs
3 *
4 * Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. 
5 *
6 * The version of the OpenAPI document: v0.0.1-alpha.1
7 * Contact: support@ory.sh
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// VolumeUsageData : VolumeUsageData Usage details about the volume. This information is used by the `GET /system/df` endpoint, and omitted in other endpoints.
12
13
14
15#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16pub struct VolumeUsageData {
17    /// The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available.
18    #[serde(rename = "RefCount")]
19    pub ref_count: i64,
20    /// Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\")
21    #[serde(rename = "Size")]
22    pub size: i64,
23}
24
25impl VolumeUsageData {
26    /// VolumeUsageData Usage details about the volume. This information is used by the `GET /system/df` endpoint, and omitted in other endpoints.
27    pub fn new(ref_count: i64, size: i64) -> VolumeUsageData {
28        VolumeUsageData {
29            ref_count,
30            size,
31        }
32    }
33}
34
35