bitwarden_api_api/models/storage_update_request.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/// StorageUpdateRequest : Request model for updating storage allocation on a user's premium
16/// subscription. Allows for both increasing and decreasing storage in an idempotent manner.
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
18pub struct StorageUpdateRequest {
19 /// The additional storage in GB beyond the base storage. Must be between 0 and the maximum
20 /// allowed (minus base storage).
21 #[serde(rename = "additionalStorageGb", alias = "AdditionalStorageGb")]
22 pub additional_storage_gb: i32,
23}
24
25impl StorageUpdateRequest {
26 /// Request model for updating storage allocation on a user's premium subscription. Allows for
27 /// both increasing and decreasing storage in an idempotent manner.
28 pub fn new(additional_storage_gb: i32) -> StorageUpdateRequest {
29 StorageUpdateRequest {
30 additional_storage_gb,
31 }
32 }
33}