Skip to main content

windmill_api/models/
get_log_cleanup_status_200_response.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.741.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct GetLogCleanupStatus200Response {
16    #[serde(rename = "running")]
17    pub running: bool,
18    #[serde(rename = "started_at")]
19    pub started_at: String,
20    #[serde(rename = "finished_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
21    pub finished_at: Option<Option<String>>,
22    #[serde(rename = "phase")]
23    pub phase: String,
24    #[serde(rename = "total_service")]
25    pub total_service: i64,
26    #[serde(rename = "processed_service")]
27    pub processed_service: i64,
28    #[serde(rename = "total_jobs")]
29    pub total_jobs: i64,
30    #[serde(rename = "processed_jobs")]
31    pub processed_jobs: i64,
32    #[serde(rename = "s3_deleted")]
33    pub s3_deleted: i64,
34    #[serde(rename = "s3_not_found", skip_serializing_if = "Option::is_none")]
35    pub s3_not_found: Option<i64>,
36    #[serde(rename = "orphans_scanned")]
37    pub orphans_scanned: i64,
38    #[serde(rename = "orphans_deleted")]
39    pub orphans_deleted: i64,
40    #[serde(rename = "errors")]
41    pub errors: i64,
42    #[serde(rename = "last_error", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
43    pub last_error: Option<Option<String>>,
44}
45
46impl GetLogCleanupStatus200Response {
47    pub fn new(running: bool, started_at: String, phase: String, total_service: i64, processed_service: i64, total_jobs: i64, processed_jobs: i64, s3_deleted: i64, orphans_scanned: i64, orphans_deleted: i64, errors: i64) -> GetLogCleanupStatus200Response {
48        GetLogCleanupStatus200Response {
49            running,
50            started_at,
51            finished_at: None,
52            phase,
53            total_service,
54            processed_service,
55            total_jobs,
56            processed_jobs,
57            s3_deleted,
58            s3_not_found: None,
59            orphans_scanned,
60            orphans_deleted,
61            errors,
62            last_error: None,
63        }
64    }
65}
66