Skip to main content

windmill_api/models/
trash_item_with_data.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.813.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 TrashItemWithData {
16    #[serde(rename = "id")]
17    pub id: i64,
18    #[serde(rename = "workspace_id")]
19    pub workspace_id: String,
20    /// script, flow, app, schedule, variable, resource, or a trigger kind such as http_trigger
21    #[serde(rename = "item_kind")]
22    pub item_kind: String,
23    #[serde(rename = "item_path")]
24    pub item_path: String,
25    #[serde(rename = "deleted_by")]
26    pub deleted_by: String,
27    #[serde(rename = "deleted_at")]
28    pub deleted_at: String,
29    /// when the item is permanently deleted unless restored first
30    #[serde(rename = "expires_at")]
31    pub expires_at: String,
32    /// the deleted rows as they were stored; the shape depends on the kind, and a secret variable's value stays encrypted 
33    #[serde(rename = "item_data")]
34    pub item_data: std::collections::HashMap<String, serde_json::Value>,
35}
36
37impl TrashItemWithData {
38    pub fn new(id: i64, workspace_id: String, item_kind: String, item_path: String, deleted_by: String, deleted_at: String, expires_at: String, item_data: std::collections::HashMap<String, serde_json::Value>) -> TrashItemWithData {
39        TrashItemWithData {
40            id,
41            workspace_id,
42            item_kind,
43            item_path,
44            deleted_by,
45            deleted_at,
46            expires_at,
47            item_data,
48        }
49    }
50}
51