1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
* Hetzner Cloud API
*
* Copied from the official API documentation for the Public Hetzner Cloud.
*
* The version of the OpenAPI document: 0.28.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// CreateServerRequestPublicNet : Public Network options.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateServerRequestPublicNet {
/// Attach an IPv4 on the public NIC. If false, no IPv4 address will be attached.
#[serde(rename = "enable_ipv4", skip_serializing_if = "Option::is_none")]
pub enable_ipv4: Option<bool>,
/// Attach an IPv6 on the public NIC. If false, no IPv6 address will be attached.
#[serde(rename = "enable_ipv6", skip_serializing_if = "Option::is_none")]
pub enable_ipv6: Option<bool>,
/// ID of the ipv4 Primary IP to use. If omitted and enable_ipv4 is true, a new ipv4 Primary IP will automatically be created.
#[serde(
rename = "ipv4",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub ipv4: Option<Option<i32>>,
/// ID of the ipv6 Primary IP to use. If omitted and enable_ipv6 is true, a new ipv6 Primary IP will automatically be created.
#[serde(
rename = "ipv6",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub ipv6: Option<Option<i32>>,
}
impl CreateServerRequestPublicNet {
/// Public Network options.
pub fn new() -> CreateServerRequestPublicNet {
CreateServerRequestPublicNet {
enable_ipv4: None,
enable_ipv6: None,
ipv4: None,
ipv6: None,
}
}
}