windmill_api/models/
list_dispatch_events_200_response_inner.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ListDispatchEvents200ResponseInner {
16 #[serde(rename = "subscriber_path")]
17 pub subscriber_path: String,
18 #[serde(rename = "asset_kind")]
19 pub asset_kind: AssetKind,
20 #[serde(rename = "asset_path")]
21 pub asset_path: String,
22 #[serde(rename = "outcome")]
23 pub outcome: Outcome,
24 #[serde(rename = "child_job_id", skip_serializing_if = "Option::is_none")]
25 pub child_job_id: Option<uuid::Uuid>,
26 #[serde(rename = "partition", skip_serializing_if = "Option::is_none")]
27 pub partition: Option<String>,
28 #[serde(rename = "received_inputs", skip_serializing_if = "Option::is_none")]
29 pub received_inputs: Option<i32>,
30 #[serde(rename = "required_inputs", skip_serializing_if = "Option::is_none")]
31 pub required_inputs: Option<i32>,
32 #[serde(rename = "debounce_s", skip_serializing_if = "Option::is_none")]
33 pub debounce_s: Option<i32>,
34 #[serde(rename = "reason", skip_serializing_if = "Option::is_none")]
35 pub reason: Option<String>,
36 #[serde(rename = "created_at")]
37 pub created_at: String,
38}
39
40impl ListDispatchEvents200ResponseInner {
41 pub fn new(subscriber_path: String, asset_kind: AssetKind, asset_path: String, outcome: Outcome, created_at: String) -> ListDispatchEvents200ResponseInner {
42 ListDispatchEvents200ResponseInner {
43 subscriber_path,
44 asset_kind,
45 asset_path,
46 outcome,
47 child_job_id: None,
48 partition: None,
49 received_inputs: None,
50 required_inputs: None,
51 debounce_s: None,
52 reason: None,
53 created_at,
54 }
55 }
56}
57#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
59pub enum AssetKind {
60 #[serde(rename = "s3object")]
61 S3object,
62 #[serde(rename = "resource")]
63 Resource,
64 #[serde(rename = "variable")]
65 Variable,
66 #[serde(rename = "ducklake")]
67 Ducklake,
68 #[serde(rename = "datatable")]
69 Datatable,
70 #[serde(rename = "volume")]
71 Volume,
72}
73
74impl Default for AssetKind {
75 fn default() -> AssetKind {
76 Self::S3object
77 }
78}
79#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
81pub enum Outcome {
82 #[serde(rename = "dispatched")]
83 Dispatched,
84 #[serde(rename = "join_pending")]
85 JoinPending,
86 #[serde(rename = "skipped")]
87 Skipped,
88}
89
90impl Default for Outcome {
91 fn default() -> Outcome {
92 Self::Dispatched
93 }
94}
95