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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
* 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};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ZoneAuthoritativeNameservers {
/// Authoritative Hetzner nameservers assigned to this Zone.
#[serde(rename = "assigned")]
pub assigned: Vec<String>,
/// Authoritative nameservers currently delegated to by the parent DNS zone. If these don't match the assigned authoritative nameservers, the DNS zone is currently not being served by Hetzner.
#[serde(rename = "delegated")]
pub delegated: Vec<String>,
/// Point in time (in ISO-8601 format) when the DNS zone delegation was last checked.
#[serde(
rename = "delegation_last_check",
deserialize_with = "Option::deserialize"
)]
pub delegation_last_check: Option<String>,
/// Status of the delegation. - `valid` - Parent zone correctly delegates to assigned nameservers. - `partially-valid` - Parent zone delegates to additional Hetzner nameservers not assigned to this zone. - `invalid` - Parent zone does not delegate to the assigned nameservers. - `lame` - Parent zone delegates to nameservers that don't know the zone. - `unregistered` - Domain is not registered. - `unknown` - Not yet known.
#[serde(rename = "delegation_status", skip_serializing_if = "Option::is_none")]
pub delegation_status: Option<DelegationStatus>,
}
impl ZoneAuthoritativeNameservers {
pub fn new(
assigned: Vec<String>,
delegated: Vec<String>,
delegation_last_check: Option<String>,
) -> ZoneAuthoritativeNameservers {
ZoneAuthoritativeNameservers {
assigned,
delegated,
delegation_last_check,
delegation_status: None,
}
}
}
/// Status of the delegation. - `valid` - Parent zone correctly delegates to assigned nameservers. - `partially-valid` - Parent zone delegates to additional Hetzner nameservers not assigned to this zone. - `invalid` - Parent zone does not delegate to the assigned nameservers. - `lame` - Parent zone delegates to nameservers that don't know the zone. - `unregistered` - Domain is not registered. - `unknown` - Not yet known.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum DelegationStatus {
#[serde(rename = "invalid")]
Invalid,
#[serde(rename = "lame")]
Lame,
#[serde(rename = "partially-valid")]
PartiallyValid,
#[serde(rename = "unknown")]
Unknown,
#[serde(rename = "unregistered")]
Unregistered,
#[serde(rename = "valid")]
Valid,
}
impl Default for DelegationStatus {
fn default() -> DelegationStatus {
Self::Invalid
}
}