windmill-api 1.777.1

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Windmill API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.777.1
 * 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>,
    /// When the dbt half on screen was parsed, for a graph pinned to a job. What the dbt editor labels its provenance with — \"parsed from the editor at 14:32\" against \"as of last deploy\" — since the two are drawn identically and the ambiguity would otherwise just move into the editor. Omitted for the unpinned workspace graph, which spans every project and so has no one time.
    #[serde(rename = "dbt_graph_ingested_at", skip_serializing_if = "Option::is_none")]
    pub dbt_graph_ingested_at: Option<String>,
}

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,
            dbt_graph_ingested_at: None,
        }
    }
}