/*
 * Hotdata API
 *
 * Powerful data platform API for datasets, queries, and analytics.
 *
 * The version of the OpenAPI document: 1.0.0
 * Contact: developers@hotdata.dev
 * Generated by: https://openapi-generator.tech
 */

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

/// JobResult : Job-specific result payload. The shape depends on the job type. Null while the job is pending or running.
/// Job-specific result payload. The shape depends on the job type. Null while the job is pending or running.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum JobResult {
    TableRefreshResult(Box<models::TableRefreshResult>),
    ConnectionRefreshResult(Box<models::ConnectionRefreshResult>),
    RefreshDatasetResponse(Box<models::RefreshDatasetResponse>),
    IndexInfoResponse(Box<models::IndexInfoResponse>),
}

impl Default for JobResult {
    fn default() -> Self {
        Self::TableRefreshResult(Default::default())
    }
}
