/*
* 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};
/// SocketContract : SocketContract names every frame the socket carries. Its fields are what put these messages in the generated clients: a websocket has no HTTP operation of its own, and a message no operation mentions is not emitted. The endpoint answers with the protocol version; the rest of this message is the schema both sides are generated from.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SocketContract {
#[serde(rename = "assistantError", skip_serializing_if = "Option::is_none")]
pub assistant_error: Option<Box<models::SocketAssistantErrorMessage>>,
#[serde(rename = "assistantProgress", skip_serializing_if = "Option::is_none")]
pub assistant_progress: Option<Box<models::SocketAssistantProgressMessage>>,
#[serde(rename = "assistantResponse", skip_serializing_if = "Option::is_none")]
pub assistant_response: Option<Box<models::SocketAssistantResponseMessage>>,
#[serde(rename = "assistantSend", skip_serializing_if = "Option::is_none")]
pub assistant_send: Option<Box<models::SocketAssistantSendRequest>>,
#[serde(rename = "connected", skip_serializing_if = "Option::is_none")]
pub connected: Option<Box<models::SocketConnectedMessage>>,
#[serde(rename = "event", skip_serializing_if = "Option::is_none")]
pub event: Option<Box<models::SocketEventMessage>>,
#[serde(rename = "ping", skip_serializing_if = "Option::is_none")]
pub ping: Option<Box<models::SocketPingRequest>>,
#[serde(rename = "pong", skip_serializing_if = "Option::is_none")]
pub pong: Option<Box<models::SocketPongMessage>>,
#[serde(rename = "protocolVersion", skip_serializing_if = "Option::is_none")]
pub protocol_version: Option<String>,
#[serde(rename = "subscribe", skip_serializing_if = "Option::is_none")]
pub subscribe: Option<Box<models::SocketSubscribeRequest>>,
#[serde(rename = "subscribeDenied", skip_serializing_if = "Option::is_none")]
pub subscribe_denied: Option<Box<models::SocketSubscribeDeniedMessage>>,
#[serde(rename = "subscribed", skip_serializing_if = "Option::is_none")]
pub subscribed: Option<Box<models::SocketSubscribedMessage>>,
#[serde(rename = "unsubscribe", skip_serializing_if = "Option::is_none")]
pub unsubscribe: Option<Box<models::SocketUnsubscribeRequest>>,
}
impl SocketContract {
/// SocketContract names every frame the socket carries. Its fields are what put these messages in the generated clients: a websocket has no HTTP operation of its own, and a message no operation mentions is not emitted. The endpoint answers with the protocol version; the rest of this message is the schema both sides are generated from.
pub fn new() -> SocketContract {
SocketContract {
assistant_error: None,
assistant_progress: None,
assistant_response: None,
assistant_send: None,
connected: None,
event: None,
ping: None,
pong: None,
protocol_version: None,
subscribe: None,
subscribe_denied: None,
subscribed: None,
unsubscribe: None,
}
}
}