geoengine-api-client 0.9.2

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Geo Engine API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * Contact: dev@geoengine.de
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TaskStatusWithId {
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "estimatedTimeRemaining")]
    pub estimated_time_remaining: String,
    #[serde(rename = "info", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub info: Option<Option<serde_json::Value>>,
    #[serde(rename = "pctComplete")]
    pub pct_complete: String,
    #[serde(rename = "status")]
    pub status: Status,
    #[serde(rename = "taskType")]
    pub task_type: String,
    #[serde(rename = "timeStarted")]
    pub time_started: String,
    #[serde(rename = "timeTotal")]
    pub time_total: String,
    #[serde(rename = "cleanUp", deserialize_with = "Option::deserialize")]
    pub clean_up: Option<serde_json::Value>,
    #[serde(rename = "error", deserialize_with = "Option::deserialize")]
    pub error: Option<serde_json::Value>,
    #[serde(rename = "taskId")]
    pub task_id: uuid::Uuid,
}

impl TaskStatusWithId {
    pub fn new(estimated_time_remaining: String, pct_complete: String, status: Status, task_type: String, time_started: String, time_total: String, clean_up: Option<serde_json::Value>, error: Option<serde_json::Value>, task_id: uuid::Uuid) -> TaskStatusWithId {
        TaskStatusWithId {
            description: None,
            estimated_time_remaining,
            info: None,
            pct_complete,
            status,
            task_type,
            time_started,
            time_total,
            clean_up,
            error,
            task_id,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "failed")]
    Failed,
}

impl Default for Status {
    fn default() -> Status {
        Self::Failed
    }
}