/*
* Windmill API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.817.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. `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 and switch is then moot.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GuestUsage {
#[serde(rename = "available")]
pub available: bool,
#[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. `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 and switch is then moot.
pub fn new(available: bool, instance_enabled: bool, guest_count: i64, window_days: i32, free_allowance: i64, metered: bool, billable_guests: i64, guest_seats: i64) -> GuestUsage {
GuestUsage {
available,
instance_enabled,
guest_count,
window_days,
free_allowance,
metered,
billable_guests,
guest_seats,
}
}
}