/*
* Hanzo Cloud API
*
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TicketGrant {
/// ExpiresIn is how long the ticket is good for, in seconds.
#[serde(rename = "expiresIn", skip_serializing_if = "Option::is_none")]
pub expires_in: Option<i32>,
/// Ticket is the grant itself. It is single-purpose and short-lived, and it travels in a query string because a WebSocket handshake carries no Authorization header a browser can set.
#[serde(rename = "ticket", skip_serializing_if = "Option::is_none")]
pub ticket: Option<String>,
/// URL is the PATH to open, ticket included — not an absolute URL. Which host this address wears in public is the edge's answer and not this process's, so an absolute URL would be a guess; the client already knows the host it is talking to. It names the PAGE, which is what a caller embeds — the page finds its own socket, and a caller that wants the raw socket adds `/ws`.
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
}
impl TicketGrant {
pub fn new() -> TicketGrant {
TicketGrant {
expires_in: None,
ticket: None,
url: None,
}
}
}