Skip to main content

windmill_api/models/
deploy_event_kind.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.778.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// DeployEventKind : What a deploy event did to the path it is recorded against: `write` (the path holds an item after the event), `delete` (it does not), or `rename_from` (the path was vacated by a rename to another path). Create and update are not distinguished. Omitted when no such event has been recorded for that side, which counts as no evidence. 
15/// What a deploy event did to the path it is recorded against: `write` (the path holds an item after the event), `delete` (it does not), or `rename_from` (the path was vacated by a rename to another path). Create and update are not distinguished. Omitted when no such event has been recorded for that side, which counts as no evidence. 
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum DeployEventKind {
18    #[serde(rename = "write")]
19    Write,
20    #[serde(rename = "delete")]
21    Delete,
22    #[serde(rename = "rename_from")]
23    RenameFrom,
24
25}
26
27impl std::fmt::Display for DeployEventKind {
28    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
29        match self {
30            Self::Write => write!(f, "write"),
31            Self::Delete => write!(f, "delete"),
32            Self::RenameFrom => write!(f, "rename_from"),
33        }
34    }
35}
36
37impl Default for DeployEventKind {
38    fn default() -> DeployEventKind {
39        Self::Write
40    }
41}
42