/*
 * 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 CaptureConfig {
    #[serde(rename = "trigger_config", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub trigger_config: Option<Option<serde_json::Value>>,
    #[serde(rename = "trigger_kind")]
    pub trigger_kind: models::CaptureTriggerKind,
    #[serde(rename = "error", skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    #[serde(rename = "last_server_ping", skip_serializing_if = "Option::is_none")]
    pub last_server_ping: Option<String>,
}

impl CaptureConfig {
    pub fn new(trigger_kind: models::CaptureTriggerKind) -> CaptureConfig {
        CaptureConfig {
            trigger_config: None,
            trigger_kind,
            error: None,
            last_server_ping: None,
        }
    }
}

