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
/*
* 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};
/// AttachServerToNetworkRequest : Request for POST https://api.hetzner.cloud/v1/servers/{id}/actions/attach_to_network
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AttachServerToNetworkRequest {
/// Additional IPs to be assigned to this Server.
#[serde(rename = "alias_ips", skip_serializing_if = "Option::is_none")]
pub alias_ips: Option<Vec<String>>,
/// IP to request to be assigned to this Server; if you do not provide this then you will be auto assigned an IP address.
#[serde(rename = "ip", skip_serializing_if = "Option::is_none")]
pub ip: Option<String>,
/// IP range in CIDR block notation of the subnet to attach to. This allows for auto assigning an IP address for a specific subnet. Providing `ip` that is not part of `ip_range` will result in an error.
#[serde(rename = "ip_range", skip_serializing_if = "Option::is_none")]
pub ip_range: Option<String>,
/// ID of an existing network to attach the Server to.
#[serde(rename = "network")]
pub network: i64,
}
impl AttachServerToNetworkRequest {
/// Request for POST https://api.hetzner.cloud/v1/servers/{id}/actions/attach_to_network
pub fn new(network: i64) -> AttachServerToNetworkRequest {
AttachServerToNetworkRequest {
alias_ips: None,
ip: None,
ip_range: None,
network,
}
}
}