Skip to main content

windmill_api/models/
resource_version.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.796.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ResourceVersion {
16    /// How this version is addressed. Unique across every resource, so it says nothing about how many times this one has been saved.
17    #[serde(rename = "id")]
18    pub id: i64,
19    /// Which version of this resource it is, counted from its first. What a version is called.
20    #[serde(rename = "version")]
21    pub version: i64,
22    #[serde(rename = "created_at")]
23    pub created_at: String,
24    #[serde(rename = "created_by", skip_serializing_if = "Option::is_none")]
25    pub created_by: Option<String>,
26}
27
28impl ResourceVersion {
29    pub fn new(id: i64, version: i64, created_at: String) -> ResourceVersion {
30        ResourceVersion {
31            id,
32            version,
33            created_at,
34            created_by: None,
35        }
36    }
37}
38