Skip to main content

clientapi_pve/models/
cluster_sdn_update_node_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 ClusterSdnUpdateNodeRequest {
16
17    /// A list of IPs that are routable via this node in the WireGuard fabric.
18    #[serde(rename = "allowed_ips", skip_serializing_if = "Option::is_none")]
19    pub allowed_ips: Option<Vec<String>>,
20
21    #[serde(rename = "delete")]
22    pub delete: Vec<serde_json::Value>,
23
24    /// Prevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications.
25    #[serde(rename = "digest", skip_serializing_if = "Option::is_none")]
26    pub digest: Option<String>,
27
28    /// The endpoint used for connecting to this node.
29    #[serde(rename = "endpoint", skip_serializing_if = "Option::is_none")]
30    pub endpoint: Option<String>,
31
32    #[serde(rename = "interfaces")]
33    pub interfaces: Vec<serde_json::Value>,
34
35    /// IPv4 address for this node
36    #[serde(rename = "ip", skip_serializing_if = "Option::is_none")]
37    pub ip: Option<String>,
38
39    /// IPv6 address for this node
40    #[serde(rename = "ip6", skip_serializing_if = "Option::is_none")]
41    pub ip6: Option<String>,
42
43    /// the token for unlocking the global SDN configuration
44    #[serde(rename = "lock-token", skip_serializing_if = "Option::is_none")]
45    pub lock_token: Option<String>,
46
47    #[serde(rename = "peers", skip_serializing_if = "Option::is_none")]
48    pub peers: Option<Vec<models::ClusterSdnListAllResponseDataNodesInnerPeersInner>>,
49
50    /// Type of configuration entry in an SDN Fabric section config
51    #[serde(rename = "protocol")]
52    pub protocol: models::PveProtocolEnum,
53
54    /// The public key for the external node.
55    #[serde(rename = "public_key", skip_serializing_if = "Option::is_none")]
56    pub public_key: Option<String>,
57
58    /// The role of this node in the WireGuard fabric.
59    #[serde(rename = "role", skip_serializing_if = "Option::is_none")]
60    pub role: Option<models::PveRoleEnum>,
61
62
63}
64
65impl ClusterSdnUpdateNodeRequest {
66    pub fn new(delete: Vec<serde_json::Value>, interfaces: Vec<serde_json::Value>, protocol: models::PveProtocolEnum) -> ClusterSdnUpdateNodeRequest {
67        ClusterSdnUpdateNodeRequest {
68            
69            allowed_ips: None,
70            
71            delete,
72            
73            digest: None,
74            
75            endpoint: None,
76            
77            interfaces,
78            
79            ip: None,
80            
81            ip6: None,
82            
83            lock_token: None,
84            
85            peers: None,
86            
87            protocol,
88            
89            public_key: None,
90            
91            role: None,
92            
93        }
94    }
95}
96
97