windmill_api/models/delivery_type.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.626.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// DeliveryType : Delivery mode for messages. 'push' for HTTP push delivery where messages are sent to a webhook endpoint, 'pull' for polling where the trigger actively fetches messages.
15/// Delivery mode for messages. 'push' for HTTP push delivery where messages are sent to a webhook endpoint, 'pull' for polling where the trigger actively fetches messages.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum DeliveryType {
18 #[serde(rename = "push")]
19 Push,
20 #[serde(rename = "pull")]
21 Pull,
22
23}
24
25impl std::fmt::Display for DeliveryType {
26 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
27 match self {
28 Self::Push => write!(f, "push"),
29 Self::Pull => write!(f, "pull"),
30 }
31 }
32}
33
34impl Default for DeliveryType {
35 fn default() -> DeliveryType {
36 Self::Push
37 }
38}
39