Skip to main content

windmill_api/models/
get_assets_graph_200_response_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.748.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 GetAssetsGraph200ResponseAssetsInner {
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}
24
25impl GetAssetsGraph200ResponseAssetsInner {
26    pub fn new(kind: models::AssetKind, path: String) -> GetAssetsGraph200ResponseAssetsInner {
27        GetAssetsGraph200ResponseAssetsInner {
28            kind,
29            path,
30            fork_materialization: None,
31        }
32    }
33}
34/// 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.
35#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
36pub enum ForkMaterialization {
37    #[serde(rename = "fork")]
38    Fork,
39    #[serde(rename = "deferred")]
40    Deferred,
41}
42
43impl Default for ForkMaterialization {
44    fn default() -> ForkMaterialization {
45        Self::Fork
46    }
47}
48