Skip to main content

bitwarden_api_api/models/
storage.rs

1/*
2 * Bitwarden Internal API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: latest
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Storage {
17    /// The amount of storage the subscriber has available.
18    #[serde(rename = "available", alias = "Available")]
19    pub available: i32,
20    /// The amount of storage the subscriber has used.
21    #[serde(rename = "used", alias = "Used")]
22    pub used: f64,
23    /// The amount of storage the subscriber has used, formatted as a human-readable string.
24    #[serde(rename = "readableUsed", alias = "ReadableUsed")]
25    pub readable_used: Option<String>,
26}
27
28impl Storage {
29    pub fn new(available: i32, used: f64, readable_used: Option<String>) -> Storage {
30        Storage {
31            available,
32            used,
33            readable_used,
34        }
35    }
36}