Skip to main content

clientapi_pve/models/
cluster_sdn_create_subnets_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 ClusterSdnCreateSubnetsRequest {
16
17    /// IP address for the DNS server
18    #[serde(rename = "dhcp-dns-server", skip_serializing_if = "Option::is_none")]
19    pub dhcp_dns_server: Option<String>,
20
21    /// A list of DHCP ranges for this subnet
22    #[serde(rename = "dhcp-range", skip_serializing_if = "Option::is_none")]
23    pub dhcp_range: Option<Vec<String>>,
24
25    /// dns domain zone prefix  ex: 'adm' -> <hostname>.adm.mydomain.com
26    #[serde(rename = "dnszoneprefix", skip_serializing_if = "Option::is_none")]
27    pub dnszoneprefix: Option<String>,
28
29    /// Subnet Gateway: Will be assign on vnet for layer3 zones
30    #[serde(rename = "gateway", skip_serializing_if = "Option::is_none")]
31    pub gateway: Option<String>,
32
33    /// the token for unlocking the global SDN configuration
34    #[serde(rename = "lock-token", skip_serializing_if = "Option::is_none")]
35    pub lock_token: Option<String>,
36
37    /// enable masquerade for this subnet if pve-firewall
38    #[serde(rename = "snat", skip_serializing_if = "Option::is_none")]
39    pub snat: Option<models::PveBoolean>,
40
41    /// The SDN subnet object identifier.
42    #[serde(rename = "subnet")]
43    pub subnet: String,
44
45    #[serde(rename = "type")]
46    pub r#type: models::PveClusterSdnTypeEnum2,
47
48
49}
50
51impl ClusterSdnCreateSubnetsRequest {
52    pub fn new(subnet: String, r#type: models::PveClusterSdnTypeEnum2) -> ClusterSdnCreateSubnetsRequest {
53        ClusterSdnCreateSubnetsRequest {
54            
55            dhcp_dns_server: None,
56            
57            dhcp_range: None,
58            
59            dnszoneprefix: None,
60            
61            gateway: None,
62            
63            lock_token: None,
64            
65            snat: None,
66            
67            subnet,
68            
69            r#type,
70            
71        }
72    }
73}
74
75