/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.2
 * Contact: contact@orvanta.cloud
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Capture {
    #[serde(rename = "trigger_kind")]
    pub trigger_kind: models::CaptureTriggerKind,
    #[serde(rename = "main_args", deserialize_with = "Option::deserialize")]
    pub main_args: Option<serde_json::Value>,
    #[serde(rename = "preprocessor_args", deserialize_with = "Option::deserialize")]
    pub preprocessor_args: Option<serde_json::Value>,
    #[serde(rename = "id")]
    pub id: i32,
    #[serde(rename = "created_at")]
    pub created_at: String,
}

impl Capture {
    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 {
        Capture {
            trigger_kind,
            main_args,
            preprocessor_args,
            id,
            created_at,
        }
    }
}

