1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
* 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,
}
}
}