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
/*
* Hetzner Cloud API
*
* Copied from the official API documentation for the Public Hetzner Cloud.
*
* The version of the OpenAPI document: 0.12.0
*
* Generated by: https://openapi-generator.tech
*/
/// AssignPrimaryIpToResourceRequest : Request for POST https://api.hetzner.cloud/v1/primary_ips/{id}/actions/assign
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct AssignPrimaryIpToResourceRequest {
/// ID of a resource of type `assignee_type`
#[serde(rename = "assignee_id")]
pub assignee_id: i32,
/// Type of resource assigning the Primary IP to
#[serde(rename = "assignee_type")]
pub assignee_type: AssigneeType,
}
impl AssignPrimaryIpToResourceRequest {
#![allow(clippy::too_many_arguments)]
/// Request for POST https://api.hetzner.cloud/v1/primary_ips/{id}/actions/assign
pub fn new(assignee_id: i32, assignee_type: AssigneeType) -> AssignPrimaryIpToResourceRequest {
AssignPrimaryIpToResourceRequest {
assignee_id,
assignee_type,
}
}
}
/// Type of resource assigning the Primary IP to
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AssigneeType {
#[serde(rename = "server")]
Server,
}
impl Default for AssigneeType {
fn default() -> AssigneeType {
Self::Server
}
}