windmill_api/models/
data_table_settings_datatables_value_database.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.592.1
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 DataTableSettingsDatatablesValueDatabase {
16    #[serde(rename = "resource_type")]
17    pub resource_type: ResourceType,
18    #[serde(rename = "resource_path", skip_serializing_if = "Option::is_none")]
19    pub resource_path: Option<String>,
20}
21
22impl DataTableSettingsDatatablesValueDatabase {
23    pub fn new(resource_type: ResourceType) -> DataTableSettingsDatatablesValueDatabase {
24        DataTableSettingsDatatablesValueDatabase {
25            resource_type,
26            resource_path: None,
27        }
28    }
29}
30/// 
31#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
32pub enum ResourceType {
33    #[serde(rename = "postgresql")]
34    Postgresql,
35    #[serde(rename = "instance")]
36    Instance,
37}
38
39impl Default for ResourceType {
40    fn default() -> ResourceType {
41        Self::Postgresql
42    }
43}
44