Skip to main content

openapi_service_fabric/models/
http_route_match_header.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/// HttpRouteMatchHeader : Describes header information for http route matching.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct HttpRouteMatchHeader {
17    /// Name of header to match in request.
18    #[serde(rename = "name")]
19    pub name: String,
20    /// Value of header to match in request.
21    #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
22    pub value: Option<String>,
23    /// how to match header value
24    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
25    pub r#type: Option<Type>,
26}
27
28impl HttpRouteMatchHeader {
29    /// Describes header information for http route matching.
30    pub fn new(name: String) -> HttpRouteMatchHeader {
31        HttpRouteMatchHeader {
32            name,
33            value: None,
34            r#type: None,
35        }
36    }
37}
38/// how to match header value
39#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
40pub enum Type {
41    #[serde(rename = "exact")]
42    Exact,
43}
44
45impl Default for Type {
46    fn default() -> Type {
47        Self::Exact
48    }
49}