Skip to main content

windmill_api/models/
get_resource_version_200_response.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 GetResourceVersion200Response {
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    #[serde(rename = "value", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27    pub value: Option<Option<serde_json::Value>>,
28    #[serde(rename = "missing_references")]
29    pub missing_references: Vec<String>,
30}
31
32impl GetResourceVersion200Response {
33    pub fn new(id: i64, version: i64, created_at: String, missing_references: Vec<String>) -> GetResourceVersion200Response {
34        GetResourceVersion200Response {
35            id,
36            version,
37            created_at,
38            created_by: None,
39            value: None,
40            missing_references,
41        }
42    }
43}
44