windmill_api/models/guest_usage.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.858.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// GuestUsage : Guests are free up to `free_allowance` distinct emails over the trailing `window_days`. Past that an Enterprise plan meters them (`metered`, four guests to one seat: `billable_guests`, `guest_seats`); every other plan and build admits no new email until the count drops. `available` is whether this deployment can have guests at all: false on the shared cloud, where guest access requires a self-hosted or dedicated deployment, and every other field is then moot.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct GuestUsage {
17 #[serde(rename = "available")]
18 pub available: bool,
19 #[serde(rename = "guest_count")]
20 pub guest_count: i64,
21 #[serde(rename = "window_days")]
22 pub window_days: i32,
23 #[serde(rename = "free_allowance")]
24 pub free_allowance: i64,
25 #[serde(rename = "metered")]
26 pub metered: bool,
27 #[serde(rename = "billable_guests")]
28 pub billable_guests: i64,
29 #[serde(rename = "guest_seats")]
30 pub guest_seats: i64,
31}
32
33impl GuestUsage {
34 /// Guests are free up to `free_allowance` distinct emails over the trailing `window_days`. Past that an Enterprise plan meters them (`metered`, four guests to one seat: `billable_guests`, `guest_seats`); every other plan and build admits no new email until the count drops. `available` is whether this deployment can have guests at all: false on the shared cloud, where guest access requires a self-hosted or dedicated deployment, and every other field is then moot.
35 pub fn new(available: bool, guest_count: i64, window_days: i32, free_allowance: i64, metered: bool, billable_guests: i64, guest_seats: i64) -> GuestUsage {
36 GuestUsage {
37 available,
38 guest_count,
39 window_days,
40 free_allowance,
41 metered,
42 billable_guests,
43 guest_seats,
44 }
45 }
46}
47