windmill-api 1.680.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.680.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 ListableResource {
    #[serde(rename = "workspace_id", skip_serializing_if = "Option::is_none")]
    pub workspace_id: Option<String>,
    #[serde(rename = "path")]
    pub path: String,
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "resource_type")]
    pub resource_type: String,
    #[serde(rename = "value", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub value: Option<Option<serde_json::Value>>,
    #[serde(rename = "is_oauth")]
    pub is_oauth: bool,
    #[serde(rename = "extra_perms", skip_serializing_if = "Option::is_none")]
    pub extra_perms: Option<std::collections::HashMap<String, bool>>,
    #[serde(rename = "is_expired", skip_serializing_if = "Option::is_none")]
    pub is_expired: Option<bool>,
    #[serde(rename = "refresh_error", skip_serializing_if = "Option::is_none")]
    pub refresh_error: Option<String>,
    #[serde(rename = "is_linked")]
    pub is_linked: bool,
    #[serde(rename = "is_refreshed")]
    pub is_refreshed: bool,
    #[serde(rename = "account", skip_serializing_if = "Option::is_none")]
    pub account: Option<f64>,
    #[serde(rename = "created_by", skip_serializing_if = "Option::is_none")]
    pub created_by: Option<String>,
    #[serde(rename = "edited_at", skip_serializing_if = "Option::is_none")]
    pub edited_at: Option<String>,
    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
    pub labels: Option<Vec<String>>,
}

impl ListableResource {
    pub fn new(path: String, resource_type: String, is_oauth: bool, is_linked: bool, is_refreshed: bool) -> ListableResource {
        ListableResource {
            workspace_id: None,
            path,
            description: None,
            resource_type,
            value: None,
            is_oauth,
            extra_perms: None,
            is_expired: None,
            refresh_error: None,
            is_linked,
            is_refreshed,
            account: None,
            created_by: None,
            edited_at: None,
            labels: None,
        }
    }
}