windmill_api/models/
capture.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.511.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 Capture {
16    #[serde(rename = "trigger_kind")]
17    pub trigger_kind: models::CaptureTriggerKind,
18    #[serde(rename = "main_args", deserialize_with = "Option::deserialize")]
19    pub main_args: Option<serde_json::Value>,
20    #[serde(rename = "preprocessor_args", deserialize_with = "Option::deserialize")]
21    pub preprocessor_args: Option<serde_json::Value>,
22    #[serde(rename = "id")]
23    pub id: i32,
24    #[serde(rename = "created_at")]
25    pub created_at: String,
26}
27
28impl Capture {
29    pub fn new(trigger_kind: models::CaptureTriggerKind, main_args: Option<serde_json::Value>, preprocessor_args: Option<serde_json::Value>, id: i32, created_at: String) -> Capture {
30        Capture {
31            trigger_kind,
32            main_args,
33            preprocessor_args,
34            id,
35            created_at,
36        }
37    }
38}
39