/*
 * 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};

/// SubmitJobResponse : Response returned by APIs that submit a background job (e.g., async refresh).
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SubmitJobResponse {
    /// Job ID for status polling.
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "status")]
    pub status: models::JobStatus,
    /// URL to poll for job status.
    #[serde(rename = "status_url")]
    pub status_url: String,
}

impl SubmitJobResponse {
    /// Response returned by APIs that submit a background job (e.g., async refresh).
    pub fn new(id: String, status: models::JobStatus, status_url: String) -> SubmitJobResponse {
        SubmitJobResponse {
            id,
            status,
            status_url,
        }
    }
}
