tembo_api_client/models/
routing.rs

1/*
2 * Tembo Cloud
3 *
4 * Platform API for Tembo Cloud             </br>             </br>             To find a Tembo Data API, please find it here:             </br>             </br>             [AWS US East 1](https://api.data-1.use1.tembo.io/swagger-ui/)
5 *
6 * The version of the OpenAPI document: v1.0.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Routing : Routing is used if there is a routing port, then a service is created using that Port when ingress_path is present, an ingress is created. Otherwise, no ingress is created
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Routing {
17    #[serde(
18        rename = "entryPoints",
19        default,
20        with = "::serde_with::rust::double_option",
21        skip_serializing_if = "Option::is_none"
22    )]
23    pub entry_points: Option<Option<Vec<String>>>,
24    #[serde(
25        rename = "ingressPath",
26        default,
27        with = "::serde_with::rust::double_option",
28        skip_serializing_if = "Option::is_none"
29    )]
30    pub ingress_path: Option<Option<String>>,
31    #[serde(
32        rename = "ingressType",
33        default,
34        with = "::serde_with::rust::double_option",
35        skip_serializing_if = "Option::is_none"
36    )]
37    pub ingress_type: Option<Option<models::IngressType>>,
38    /// provide name of the middleware resources to apply to this route
39    #[serde(
40        rename = "middlewares",
41        default,
42        with = "::serde_with::rust::double_option",
43        skip_serializing_if = "Option::is_none"
44    )]
45    pub middlewares: Option<Option<Vec<String>>>,
46    #[serde(rename = "port")]
47    pub port: i32,
48}
49
50impl Routing {
51    /// Routing is used if there is a routing port, then a service is created using that Port when ingress_path is present, an ingress is created. Otherwise, no ingress is created
52    pub fn new(port: i32) -> Routing {
53        Routing {
54            entry_points: None,
55            ingress_path: None,
56            ingress_type: None,
57            middlewares: None,
58            port,
59        }
60    }
61}