windmill_api/models/free_tier_info.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.800.1
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// 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.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct FreeTierInfo {
17 /// The one-time grant is spent; no provider is served and the user must add their own API key.
18 #[serde(rename = "exhausted")]
19 pub exhausted: bool,
20 /// Fraction of the grant consumed, 0 to 1.
21 #[serde(rename = "used_ratio")]
22 pub used_ratio: f64,
23}
24
25impl FreeTierInfo {
26 /// Read-only. Present when the workspace has no AI provider of its own and is running on Windmill's free tier. Ignored on write.
27 pub fn new(exhausted: bool, used_ratio: f64) -> FreeTierInfo {
28 FreeTierInfo {
29 exhausted,
30 used_ratio,
31 }
32 }
33}
34