1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* Windmill API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.805.0
* Contact: contact@windmill.dev
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// 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. `instance_enabled` is the superadmin switch (`guest_access_disabled` global setting) every workspace switch sits under.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GuestUsage {
#[serde(rename = "instance_enabled")]
pub instance_enabled: bool,
#[serde(rename = "guest_count")]
pub guest_count: i64,
#[serde(rename = "window_days")]
pub window_days: i32,
#[serde(rename = "free_allowance")]
pub free_allowance: i64,
#[serde(rename = "metered")]
pub metered: bool,
#[serde(rename = "billable_guests")]
pub billable_guests: i64,
#[serde(rename = "guest_seats")]
pub guest_seats: i64,
}
impl 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. `instance_enabled` is the superadmin switch (`guest_access_disabled` global setting) every workspace switch sits under.
pub fn new(instance_enabled: bool, guest_count: i64, window_days: i32, free_allowance: i64, metered: bool, billable_guests: i64, guest_seats: i64) -> GuestUsage {
GuestUsage {
instance_enabled,
guest_count,
window_days,
free_allowance,
metered,
billable_guests,
guest_seats,
}
}
}