/*
* Linkbreakers API
*
* This is a documentation of all the APIs of Linkbreakers ## Entry points `GET https://api.linkbreakers.com/` and `GET https://api.linkbreakers.com/v1` answer without credentials with the API's name, version and links. This document is served at `https://api.linkbreakers.com/openapi.json`. ## Rate limits Every response describes where the caller stands in the IETF `RateLimit-Policy` and `RateLimit` header fields (draft-ietf-httpapi-ratelimit-headers), and in `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset` and `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset` (a Unix timestamp) for clients that read those. A request past the limit gets `429 Too Many Requests` with `Retry-After` in seconds. - Workspace API token: 600 requests per 60 seconds, per token. - Dashboard session or OAuth token: 500 requests per 60 seconds, per token. - No credentials: 300 requests per 60 seconds, per client IP. Each plan also includes a number of API calls per billing cycle. Past it, calls answer `429` with the code `MAX_PUBLIC_API_QUERIED_REACHED` until the cycle renews or the plan changes.
*
* The version of the OpenAPI document: 1.150.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PlanLimit {
/// - PLAN_LIMIT_KEY_UNSPECIFIED: Not set - PLAN_LIMIT_KEY_CUSTOM_DOMAINS: Custom domains connected to the workspace - PLAN_LIMIT_KEY_TEAM_MEMBERS: Members of the workspace - PLAN_LIMIT_KEY_PLATFORM_CREDITS: Platform credits, spent by creating links and by AI features - PLAN_LIMIT_KEY_TRACKED_VISITS: Tracked visits (scans and clicks) - PLAN_LIMIT_KEY_PUBLIC_API_CALLS: Public API calls - PLAN_LIMIT_KEY_WEBHOOKS: Webhooks configured in the workspace - PLAN_LIMIT_KEY_ASSISTANT_MESSAGES_PER_MINUTE: Assistant messages per minute - PLAN_LIMIT_KEY_LINKS_INCLUDED: Links the monthly platform credits pay for. Links are not capped on their own: each one spends credits.
#[serde(rename = "key", skip_serializing_if = "Option::is_none")]
pub key: Option<Key>,
/// - PLAN_LIMIT_KIND_UNSPECIFIED: Not set - PLAN_LIMIT_KIND_TOTAL: A standing total that does not refill, such as connected domains - PLAN_LIMIT_KIND_MONTHLY: An allowance that refills every month - PLAN_LIMIT_KIND_PER_MINUTE: A rate that refills every minute - PLAN_LIMIT_KIND_UNLIMITED: No ceiling - PLAN_LIMIT_KIND_METERED: No ceiling; every unit is billed
#[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
pub kind: Option<Kind>,
/// The ceiling. Absent when kind is PLAN_LIMIT_KIND_UNLIMITED or PLAN_LIMIT_KIND_METERED.
#[serde(rename = "value", skip_serializing_if = "Option::is_none")]
pub value: Option<i32>,
}
impl PlanLimit {
pub fn new() -> PlanLimit {
PlanLimit {
key: None,
kind: None,
value: None,
}
}
}
/// - PLAN_LIMIT_KEY_UNSPECIFIED: Not set - PLAN_LIMIT_KEY_CUSTOM_DOMAINS: Custom domains connected to the workspace - PLAN_LIMIT_KEY_TEAM_MEMBERS: Members of the workspace - PLAN_LIMIT_KEY_PLATFORM_CREDITS: Platform credits, spent by creating links and by AI features - PLAN_LIMIT_KEY_TRACKED_VISITS: Tracked visits (scans and clicks) - PLAN_LIMIT_KEY_PUBLIC_API_CALLS: Public API calls - PLAN_LIMIT_KEY_WEBHOOKS: Webhooks configured in the workspace - PLAN_LIMIT_KEY_ASSISTANT_MESSAGES_PER_MINUTE: Assistant messages per minute - PLAN_LIMIT_KEY_LINKS_INCLUDED: Links the monthly platform credits pay for. Links are not capped on their own: each one spends credits.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Key {
#[serde(rename = "PLAN_LIMIT_KEY_UNSPECIFIED")]
PlanLimitKeyUnspecified,
#[serde(rename = "PLAN_LIMIT_KEY_CUSTOM_DOMAINS")]
PlanLimitKeyCustomDomains,
#[serde(rename = "PLAN_LIMIT_KEY_TEAM_MEMBERS")]
PlanLimitKeyTeamMembers,
#[serde(rename = "PLAN_LIMIT_KEY_PLATFORM_CREDITS")]
PlanLimitKeyPlatformCredits,
#[serde(rename = "PLAN_LIMIT_KEY_TRACKED_VISITS")]
PlanLimitKeyTrackedVisits,
#[serde(rename = "PLAN_LIMIT_KEY_PUBLIC_API_CALLS")]
PlanLimitKeyPublicApiCalls,
#[serde(rename = "PLAN_LIMIT_KEY_WEBHOOKS")]
PlanLimitKeyWebhooks,
#[serde(rename = "PLAN_LIMIT_KEY_ASSISTANT_MESSAGES_PER_MINUTE")]
PlanLimitKeyAssistantMessagesPerMinute,
#[serde(rename = "PLAN_LIMIT_KEY_LINKS_INCLUDED")]
PlanLimitKeyLinksIncluded,
}
impl Default for Key {
fn default() -> Key {
Self::PlanLimitKeyUnspecified
}
}
/// - PLAN_LIMIT_KIND_UNSPECIFIED: Not set - PLAN_LIMIT_KIND_TOTAL: A standing total that does not refill, such as connected domains - PLAN_LIMIT_KIND_MONTHLY: An allowance that refills every month - PLAN_LIMIT_KIND_PER_MINUTE: A rate that refills every minute - PLAN_LIMIT_KIND_UNLIMITED: No ceiling - PLAN_LIMIT_KIND_METERED: No ceiling; every unit is billed
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Kind {
#[serde(rename = "PLAN_LIMIT_KIND_UNSPECIFIED")]
PlanLimitKindUnspecified,
#[serde(rename = "PLAN_LIMIT_KIND_TOTAL")]
PlanLimitKindTotal,
#[serde(rename = "PLAN_LIMIT_KIND_MONTHLY")]
PlanLimitKindMonthly,
#[serde(rename = "PLAN_LIMIT_KIND_PER_MINUTE")]
PlanLimitKindPerMinute,
#[serde(rename = "PLAN_LIMIT_KIND_UNLIMITED")]
PlanLimitKindUnlimited,
#[serde(rename = "PLAN_LIMIT_KIND_METERED")]
PlanLimitKindMetered,
}
impl Default for Kind {
fn default() -> Kind {
Self::PlanLimitKindUnspecified
}
}