windmill_api/models/subscription_mode.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.511.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// SubscriptionMode : The mode of subscription. 'existing' means using an existing GCP subscription, while 'create_update' involves creating or updating a new subscription.
15/// The mode of subscription. 'existing' means using an existing GCP subscription, while 'create_update' involves creating or updating a new subscription.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum SubscriptionMode {
18 #[serde(rename = "existing")]
19 Existing,
20 #[serde(rename = "create_update")]
21 CreateUpdate,
22
23}
24
25impl std::fmt::Display for SubscriptionMode {
26 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
27 match self {
28 Self::Existing => write!(f, "existing"),
29 Self::CreateUpdate => write!(f, "create_update"),
30 }
31 }
32}
33
34impl Default for SubscriptionMode {
35 fn default() -> SubscriptionMode {
36 Self::Existing
37 }
38}
39