hanzo-client 8.5.156

Generated client for the Hanzo API — every service, one crate.
Documentation
/*
 * 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 Route {
    /// Host is the exact hostname this route matches, lowercased with any trailing dot stripped. It is a GLOBALLY unique claim — one route across the whole edge may hold a host, so no tenant can hijack another's.
    #[serde(rename = "host", skip_serializing_if = "Option::is_none")]
    pub host: Option<String>,
    /// ID identifies the route within the org: [A-Za-z0-9-_.], at most 128 chars. A create that omits it gets a generated one.
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Middlewares are the ids of the edge transforms to apply, in this order, before the request reaches the service. At most 16.
    #[serde(rename = "middlewares", skip_serializing_if = "Option::is_none")]
    pub middlewares: Option<Vec<String>>,
    /// PathPrefix narrows the match to requests under this path; it must start with \"/\". Empty matches every path on the host.
    #[serde(rename = "pathPrefix", skip_serializing_if = "Option::is_none")]
    pub path_prefix: Option<String>,
    /// Priority orders routes that share a host: higher wins, and equal priorities fall back to the longer PathPrefix.
    #[serde(rename = "priority", skip_serializing_if = "Option::is_none")]
    pub priority: Option<i32>,
    /// Service is the id of the backend pool this route dispatches to. A route naming a service that does not exist is skipped at compile, not served.
    #[serde(rename = "service", skip_serializing_if = "Option::is_none")]
    pub service: Option<String>,
    /// TLS asks the edge to terminate TLS for Host with an ACME-managed certificate.
    #[serde(rename = "tls", skip_serializing_if = "Option::is_none")]
    pub tls: Option<bool>,
}

impl Route {
    pub fn new() -> Route {
        Route {
            host: None,
            id: None,
            middlewares: None,
            path_prefix: None,
            priority: None,
            service: None,
            tls: None,
        }
    }
}