/*
* Windmill API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.800.1
* Contact: contact@windmill.dev
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// FreeTierInfo : Read-only. Present when the workspace has no AI provider of its own and is running on Windmill's free tier. Ignored on write.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct FreeTierInfo {
/// The one-time grant is spent; no provider is served and the user must add their own API key.
#[serde(rename = "exhausted")]
pub exhausted: bool,
/// Fraction of the grant consumed, 0 to 1.
#[serde(rename = "used_ratio")]
pub used_ratio: f64,
}
impl FreeTierInfo {
/// Read-only. Present when the workspace has no AI provider of its own and is running on Windmill's free tier. Ignored on write.
pub fn new(exhausted: bool, used_ratio: f64) -> FreeTierInfo {
FreeTierInfo {
exhausted,
used_ratio,
}
}
}