Skip to main content

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.816.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// DataTableSettingsDatatablesValueDatabase : Set on an entry that owns its database. Absent on a fork's entry, which points at another workspace's data table instead.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct DataTableSettingsDatatablesValueDatabase {
17    #[serde(rename = "resource_type")]
18    pub resource_type: ResourceType,
19    #[serde(rename = "resource_path", skip_serializing_if = "Option::is_none")]
20    pub resource_path: Option<String>,
21}
22
23impl DataTableSettingsDatatablesValueDatabase {
24    /// Set on an entry that owns its database. Absent on a fork's entry, which points at another workspace's data table instead.
25    pub fn new(resource_type: ResourceType) -> DataTableSettingsDatatablesValueDatabase {
26        DataTableSettingsDatatablesValueDatabase {
27            resource_type,
28            resource_path: None,
29        }
30    }
31}
32/// 
33#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
34pub enum ResourceType {
35    #[serde(rename = "postgresql")]
36    Postgresql,
37    #[serde(rename = "instance")]
38    Instance,
39}
40
41impl Default for ResourceType {
42    fn default() -> ResourceType {
43        Self::Postgresql
44    }
45}
46