Skip to main content

windmill_api/models/
asset_graph_assets_inner.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.776.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 AssetGraphAssetsInner {
16    #[serde(rename = "kind")]
17    pub kind: models::AssetKind,
18    #[serde(rename = "path")]
19    pub path: String,
20    /// Fork workspaces only — 'fork' when this ducklake asset was materialized in the fork itself, 'deferred' when reads fall back to the parent workspace's current table via a defer view. Omitted otherwise.
21    #[serde(rename = "fork_materialization", skip_serializing_if = "Option::is_none")]
22    pub fork_materialization: Option<ForkMaterialization>,
23    #[serde(rename = "dbt", skip_serializing_if = "Option::is_none")]
24    pub dbt: Option<Box<models::DbtAssetProvenance>>,
25}
26
27impl AssetGraphAssetsInner {
28    pub fn new(kind: models::AssetKind, path: String) -> AssetGraphAssetsInner {
29        AssetGraphAssetsInner {
30            kind,
31            path,
32            fork_materialization: None,
33            dbt: None,
34        }
35    }
36}
37/// Fork workspaces only — 'fork' when this ducklake asset was materialized in the fork itself, 'deferred' when reads fall back to the parent workspace's current table via a defer view. Omitted otherwise.
38#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
39pub enum ForkMaterialization {
40    #[serde(rename = "fork")]
41    Fork,
42    #[serde(rename = "deferred")]
43    Deferred,
44}
45
46impl Default for ForkMaterialization {
47    fn default() -> ForkMaterialization {
48        Self::Fork
49    }
50}
51