Skip to main content

clientapi_pve/models/
cluster_sdn_create_route_map_entry_request.rs

1/*
2 * Proxmox Virtual Environment API
3 *
4 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-docs/api-viewer/ for the upstream documentation.
5 *
6 * The version of the OpenAPI document: 9.x
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ClusterSdnCreateRouteMapEntryRequest {
16
17    /// Matching policy of a route map entry.
18    #[serde(rename = "action")]
19    pub action: models::PveActionEnum,
20
21    /// The SDN route map identifier
22    #[serde(rename = "call", skip_serializing_if = "Option::is_none")]
23    pub call: Option<String>,
24
25    /// Prevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications.
26    #[serde(rename = "digest", skip_serializing_if = "Option::is_none")]
27    pub digest: Option<String>,
28
29    #[serde(rename = "exit-action", skip_serializing_if = "Option::is_none")]
30    pub exit_action: Option<Box<models::PveClusterSdnExitActionField>>,
31
32    /// the token for unlocking the global SDN configuration
33    #[serde(rename = "lock-token", skip_serializing_if = "Option::is_none")]
34    pub lock_token: Option<String>,
35
36    #[serde(rename = "match", skip_serializing_if = "Option::is_none")]
37    pub r#match: Option<Vec<models::ClusterSdnListRouteMapEntriesResponseDataInnerMatchInner>>,
38
39    /// The index of this route map entry
40    #[serde(rename = "order")]
41    pub order: i32,
42
43    /// The SDN route map identifier
44    #[serde(rename = "route-map-id")]
45    pub route_map_id: String,
46
47    #[serde(rename = "set", skip_serializing_if = "Option::is_none")]
48    pub set: Option<Vec<models::ClusterSdnListRouteMapEntriesResponseDataInnerSetInner>>,
49
50
51}
52
53impl ClusterSdnCreateRouteMapEntryRequest {
54    pub fn new(action: models::PveActionEnum, order: i32, route_map_id: String) -> ClusterSdnCreateRouteMapEntryRequest {
55        ClusterSdnCreateRouteMapEntryRequest {
56            
57            action,
58            
59            call: None,
60            
61            digest: None,
62            
63            exit_action: None,
64            
65            lock_token: None,
66            
67            r#match: None,
68            
69            order,
70            
71            route_map_id,
72            
73            set: None,
74            
75        }
76    }
77}
78
79