Download codex-rs/codex-backend-openapi-models/src/models/rate_limit_status_payload.rs from SaylorTwift/codex: direct link, hf CLI and curl.
- Browser
- Download file 4.07 kB
-
https://huggingface.co/SaylorTwift/codex/resolve/main/codex-rs/codex-backend-openapi-models/src/models/rate_limit_status_payload.rs
- Command line
-
hf download hf://SaylorTwift/codex/codex-rs/codex-backend-openapi-models/src/models/rate_limit_status_payload.rs
-
curl -L -o rate_limit_status_payload.rs https://huggingface.co/SaylorTwift/codex/resolve/main/codex-rs/codex-backend-openapi-models/src/models/rate_limit_status_payload.rs
4.07 kB
| /* | |
| * codex-backend | |
| * | |
| * codex-backend | |
| * | |
| * The version of the OpenAPI document: 0.0.1 | |
| * | |
| * Generated by: https://openapi-generator.tech | |
| */ | |
| use crate::models; | |
| use serde::Deserialize; | |
| use serde::Serialize; | |
| pub struct RateLimitStatusPayload { | |
| pub plan_type: PlanType, | |
| pub rate_limit: Option<Option<Box<models::RateLimitStatusDetails>>>, | |
| pub credits: Option<Option<Box<models::CreditStatusDetails>>>, | |
| pub spend_control: Option<Option<Box<models::SpendControlStatusDetails>>>, | |
| pub additional_rate_limits: Option<Option<Vec<models::AdditionalRateLimitDetails>>>, | |
| pub rate_limit_reached_type: Option<Option<RateLimitReachedType>>, | |
| } | |
| impl RateLimitStatusPayload { | |
| pub fn new(plan_type: PlanType) -> RateLimitStatusPayload { | |
| RateLimitStatusPayload { | |
| plan_type, | |
| rate_limit: None, | |
| credits: None, | |
| spend_control: None, | |
| additional_rate_limits: None, | |
| rate_limit_reached_type: None, | |
| } | |
| } | |
| } | |
| pub struct RateLimitReachedType { | |
| pub kind: RateLimitReachedKind, | |
| } | |
| pub enum RateLimitReachedKind { | |
| RateLimitReached, | |
| WorkspaceOwnerCreditsDepleted, | |
| WorkspaceMemberCreditsDepleted, | |
| WorkspaceOwnerUsageLimitReached, | |
| WorkspaceMemberUsageLimitReached, | |
| Unknown, | |
| } | |
| pub enum PlanType { | |
| Guest, | |
| Free, | |
| Go, | |
| Plus, | |
| Pro, | |
| ProLite, | |
| FreeWorkspace, | |
| Team, | |
| SelfServeBusinessProLite, | |
| SelfServeBusinessUsageBased, | |
| Business, | |
| Ent26, | |
| EnterpriseCbpAutomation, | |
| EnterpriseCbpUsageBased, | |
| Education, | |
| Quorum, | |
| K12, | |
| Enterprise, | |
| Edu, | |
| EduPlus, | |
| EduPro, | |
| Unknown, | |
| } | |