openapi_service_fabric/models/
http_route_match_path.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct HttpRouteMatchPath {
17 #[serde(rename = "value")]
19 pub value: String,
20 #[serde(rename = "rewrite", skip_serializing_if = "Option::is_none")]
22 pub rewrite: Option<String>,
23 #[serde(rename = "type")]
25 pub r#type: Type,
26}
27
28impl HttpRouteMatchPath {
29 pub fn new(value: String, r#type: Type) -> HttpRouteMatchPath {
31 HttpRouteMatchPath {
32 value,
33 rewrite: None,
34 r#type,
35 }
36 }
37}
38#[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}