windmill-api 1.683.2

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Windmill API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.683.2
 * Contact: contact@windmill.dev
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Volume {
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "size_bytes")]
    pub size_bytes: i64,
    #[serde(rename = "file_count")]
    pub file_count: i32,
    #[serde(rename = "created_at")]
    pub created_at: String,
    #[serde(rename = "created_by")]
    pub created_by: String,
    #[serde(rename = "updated_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub updated_at: Option<Option<String>>,
    #[serde(rename = "last_used_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub last_used_at: Option<Option<String>>,
    #[serde(rename = "extra_perms", skip_serializing_if = "Option::is_none")]
    pub extra_perms: Option<std::collections::HashMap<String, serde_json::Value>>,
}

impl Volume {
    pub fn new(name: String, size_bytes: i64, file_count: i32, created_at: String, created_by: String) -> Volume {
        Volume {
            name,
            size_bytes,
            file_count,
            created_at,
            created_by,
            updated_at: None,
            last_used_at: None,
            extra_perms: None,
        }
    }
}