hanzo_client/models/upstream.rs
1/*
2 * Hanzo Cloud API
3 *
4 * 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/.
5 *
6 * The version of the OpenAPI document: v1
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct Upstream {
16 /// Backends are the upstream servers to balance across: 1..32 of them.
17 #[serde(rename = "backends", skip_serializing_if = "Option::is_none")]
18 pub backends: Option<Vec<models::Backend>>,
19 /// ID identifies the pool within the org: [A-Za-z0-9-_.], at most 128 chars. A create that omits it gets a generated one. Routes reference it by this id.
20 #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
21 pub id: Option<String>,
22 /// PassHostHeader forwards the client's original Host header upstream instead of rewriting it to the backend's.
23 #[serde(rename = "passHostHeader", skip_serializing_if = "Option::is_none")]
24 pub pass_host_header: Option<bool>,
25}
26
27impl Upstream {
28 pub fn new() -> Upstream {
29 Upstream {
30 backends: None,
31 id: None,
32 pass_host_header: None,
33 }
34 }
35}
36