windmill-api 1.748.0

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.748.0
 * Contact: contact@windmill.dev
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// ContractWarning : One save-time schema-contract warning: a consumer reference that does not match the referenced asset's latest captured schema. `schema_version`/`captured_at` identify the capture the check ran against (as-of the producer's last run, not its latest save). 
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ContractWarning {
    #[serde(rename = "kind")]
    pub kind: Kind,
    #[serde(rename = "asset_path")]
    pub asset_path: String,
    #[serde(rename = "column", skip_serializing_if = "Option::is_none")]
    pub column: Option<String>,
    #[serde(rename = "expected_type", skip_serializing_if = "Option::is_none")]
    pub expected_type: Option<String>,
    #[serde(rename = "found_type", skip_serializing_if = "Option::is_none")]
    pub found_type: Option<String>,
    #[serde(rename = "schema_version", skip_serializing_if = "Option::is_none")]
    pub schema_version: Option<i64>,
    #[serde(rename = "captured_at", skip_serializing_if = "Option::is_none")]
    pub captured_at: Option<String>,
    #[serde(rename = "message")]
    pub message: String,
}

impl ContractWarning {
    /// One save-time schema-contract warning: a consumer reference that does not match the referenced asset's latest captured schema. `schema_version`/`captured_at` identify the capture the check ran against (as-of the producer's last run, not its latest save). 
    pub fn new(kind: Kind, asset_path: String, message: String) -> ContractWarning {
        ContractWarning {
            kind,
            asset_path,
            column: None,
            expected_type: None,
            found_type: None,
            schema_version: None,
            captured_at: None,
            message,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Kind {
    #[serde(rename = "missing_column")]
    MissingColumn,
    #[serde(rename = "missing_lineage_source")]
    MissingLineageSource,
    #[serde(rename = "missing_relationship_column")]
    MissingRelationshipColumn,
    #[serde(rename = "relationship_type_mismatch")]
    RelationshipTypeMismatch,
    #[serde(rename = "suppressed")]
    Suppressed,
}

impl Default for Kind {
    fn default() -> Kind {
        Self::MissingColumn
    }
}