Skip to main content

openapi_service_fabric/models/
http_route_config.rs

1/*
2 * Service Fabric Client APIs
3 *
4 * Service Fabric REST Client APIs allows management of Service Fabric clusters, applications and services.
5 *
6 * The version of the OpenAPI document: 8.2
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// HttpRouteConfig : Describes the hostname properties for http routing.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct HttpRouteConfig {
17    /// http route name.
18    #[serde(rename = "name")]
19    pub name: String,
20    #[serde(rename = "match")]
21    pub r#match: Box<models::HttpRouteMatchRule>,
22    #[serde(rename = "destination")]
23    pub destination: Box<models::GatewayDestination>,
24}
25
26impl HttpRouteConfig {
27    /// Describes the hostname properties for http routing.
28    pub fn new(
29        name: String,
30        r#match: models::HttpRouteMatchRule,
31        destination: models::GatewayDestination,
32    ) -> HttpRouteConfig {
33        HttpRouteConfig {
34            name,
35            r#match: Box::new(r#match),
36            destination: Box::new(destination),
37        }
38    }
39}