Skip to main content

openapi_service_fabric/models/
http_route_match_path.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/// HttpRouteMatchPath : Path to match for routing.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct HttpRouteMatchPath {
17    /// Uri path to match for request.
18    #[serde(rename = "value")]
19    pub value: String,
20    /// replacement string for matched part of the Uri.
21    #[serde(rename = "rewrite", skip_serializing_if = "Option::is_none")]
22    pub rewrite: Option<String>,
23    /// how to match value in the Uri
24    #[serde(rename = "type")]
25    pub r#type: Type,
26}
27
28impl HttpRouteMatchPath {
29    /// Path to match for routing.
30    pub fn new(value: String, r#type: Type) -> HttpRouteMatchPath {
31        HttpRouteMatchPath {
32            value,
33            rewrite: None,
34            r#type,
35        }
36    }
37}
38/// how to match value in the Uri
39#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
40pub enum Type {
41    #[serde(rename = "prefix")]
42    Prefix,
43}
44
45impl Default for Type {
46    fn default() -> Type {
47        Self::Prefix
48    }
49}