1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
* Windmill API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.776.0
* Contact: contact@windmill.dev
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AssetGraph {
#[serde(rename = "assets")]
pub assets: Vec<models::AssetGraphAssetsInner>,
#[serde(rename = "runnables")]
pub runnables: Vec<models::AssetGraphRunnablesInner>,
#[serde(rename = "edges")]
pub edges: Vec<models::AssetGraphEdgesInner>,
#[serde(rename = "triggers")]
pub triggers: Vec<models::AssetGraphTriggersInner>,
/// Macro-library → consumer edges (deploy-recorded call detection plus `// use`). Omitted when empty.
#[serde(rename = "macro_edges", skip_serializing_if = "Option::is_none")]
pub macro_edges: Option<Vec<models::AssetGraphMacroEdgesInner>>,
/// Ordering-only \"must-run-after\" edges — a `// data_test relationships` (or custom test reading a pipeline asset) requires the referenced asset's producer to run before the tested script. Not a data-consumption edge; fed into the cascade topo-sort so cold runs order correctly. Omitted when empty.
#[serde(rename = "test_edges", skip_serializing_if = "Option::is_none")]
pub test_edges: Option<Vec<models::AssetGraphTestEdgesInner>>,
/// `ref()` lineage BETWEEN two dbt models, in the terms the canvas draws — the relations, not dbt's node ids. Without it every model hangs off the one dbt runnable and the project reads as a flat fan-out. Omitted when empty.
#[serde(rename = "dbt_edges", skip_serializing_if = "Option::is_none")]
pub dbt_edges: Option<Vec<models::AssetGraphDbtEdgesInner>>,
/// The job whose own snapshot the dbt half was resolved from, when one was asked for and found. A run page polls the graph while its job runs, because a dynamic descriptor's snapshot is written mid-run, and this is what tells it to stop. Omitted when the answer came from the version's deployed graph.
#[serde(rename = "dbt_snapshot_job", skip_serializing_if = "Option::is_none")]
pub dbt_snapshot_job: Option<uuid::Uuid>,
}
impl AssetGraph {
pub fn new(assets: Vec<models::AssetGraphAssetsInner>, runnables: Vec<models::AssetGraphRunnablesInner>, edges: Vec<models::AssetGraphEdgesInner>, triggers: Vec<models::AssetGraphTriggersInner>) -> AssetGraph {
AssetGraph {
assets,
runnables,
edges,
triggers,
macro_edges: None,
test_edges: None,
dbt_edges: None,
dbt_snapshot_job: None,
}
}
}