Skip to main content

windmill_api/models/
custom_instance_db.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.825.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 CustomInstanceDb {
16    #[serde(rename = "logs")]
17    pub logs: Box<models::CustomInstanceDbLogs>,
18    /// Whether the operation completed successfully
19    #[serde(rename = "success")]
20    pub success: bool,
21    /// Error message if the operation failed
22    #[serde(rename = "error", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
23    pub error: Option<Option<String>>,
24    #[serde(rename = "tag", skip_serializing_if = "Option::is_none")]
25    pub tag: Option<models::CustomInstanceDbTag>,
26    /// Workspaces that reference this database through a ducklake catalog or a datatable database of the kind being listed — 'instance' for the instance databases endpoint, 'external_instance' for the external cluster one. Computed at request time, not persisted, and only returned to superadmins.
27    #[serde(rename = "used_by_workspaces", skip_serializing_if = "Option::is_none")]
28    pub used_by_workspaces: Option<Vec<String>>,
29    /// The workspace a member created this database for as a fork copy. Only that workspace can import into it or point a fork at it.
30    #[serde(rename = "workspace_id", skip_serializing_if = "Option::is_none")]
31    pub workspace_id: Option<String>,
32}
33
34impl CustomInstanceDb {
35    pub fn new(logs: models::CustomInstanceDbLogs, success: bool) -> CustomInstanceDb {
36        CustomInstanceDb {
37            logs: Box::new(logs),
38            success,
39            error: None,
40            tag: None,
41            used_by_workspaces: None,
42            workspace_id: None,
43        }
44    }
45}
46