windmill-api 1.681.0

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.681.0
 * 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 CreateResource {
    /// The path to the resource
    #[serde(rename = "path")]
    pub path: String,
    #[serde(rename = "value", deserialize_with = "Option::deserialize")]
    pub value: Option<serde_json::Value>,
    /// The description of the resource
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// The resource_type associated with the resource
    #[serde(rename = "resource_type")]
    pub resource_type: String,
    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
    pub labels: Option<Vec<String>>,
}

impl CreateResource {
    pub fn new(path: String, value: Option<serde_json::Value>, resource_type: String) -> CreateResource {
        CreateResource {
            path,
            value,
            description: None,
            resource_type,
            labels: None,
        }
    }
}