// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// Core Job object following OpenAI-style specification.
/// Represents a single asynchronous job that can be polled for status
/// and result retrieval.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Job {
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub id: Option<String>,
    /// Defaults to `job`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub object: Option<String>,
    /// Defaults to `validating`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub status: Option<JobStatus>,
    pub endpoint: SupportedEndpoint,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub error: Option<JobError>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub warnings: Option<Vec<JobWarning>>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub created_at: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub started_at: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub completed_at: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub expires_at: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub metadata: Option<std::collections::HashMap<String, String>>,
    /// Defaults to `false`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub cancelled: Option<bool>,
    /// Defaults to `0`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub attempt_count: Option<i64>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub last_attempt_at: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub last_failure_code: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub request: Option<std::collections::HashMap<String, serde_json::Value>>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub response: Option<JobResponse>,
}
