diff --git a/CHANGELOG.md b/CHANGELOG.md index 735bb425..e0912721 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,66 @@ All notable changes to this project will be documented in this file. This projec If you are upgrading from v0.16.x, replace the binary (or run `docker pull`). If you are upgrading from v0.15.x and below, please read the [upgrading documentation](https://github.com/stalwartlabs/stalwart/blob/main/UPGRADING/v0_16.md) for more information on how to upgrade from previous versions. ## Added -- Dns updater: Log DNS record types and values. +- Added 58 new DNS provider integrations: + - Akamai Edge DNS + - Alibaba Cloud DNS + - ArvanCloud + - AutoDNS + - AWS Lightsail + - Azure DNS + - Baidu Cloud DNS + - BlueCat Address Manager + - ClouDNS + - Constellix + - cPanel + - DDNSS.de + - DNS Made Easy + - Domeneshop + - DreamHost + - DuckDNS + - Dynu + - EasyDNS + - Exoscale + - FreeMyIP + - Gandi v5 + - Gcore + - GleSYS + - GoDaddy + - Hetzner DNS + - hosting.de + - Hostinger + - Huawei Cloud DNS + - Hurricane Electric + - IBM Cloud (SoftLayer) + - Infoblox NIOS + - Infomaniak + - INWX + - IONOS + - IPv64 + - Joker + - Linode + - LuaDNS + - Mythic Beasts + - Name.com + - Namecheap + - NameSilo + - netcup + - Netlify + - Nifcloud + - NS1 + - Oracle Cloud DNS + - Plesk + - SafeDNS + - Scaleway + - Tencent Cloud DNSPod + - TransIP + - UltraDNS + - Vercel + - Volcano Engine + - Vultr + - Websupport + - Yandex Cloud DNS +- DNS updater: Log DNS record types and values. ## Changed - Bump JMAP File Storage to [draft-ietf-jmap-filenode-14](https://datatracker.ietf.org/doc/html/draft-ietf-jmap-filenode-14). diff --git a/Cargo.lock b/Cargo.lock index 6e4cd77b..82baed39 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1937,9 +1937,9 @@ dependencies = [ [[package]] name = "dns-update" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b70617312220ada56e308bf4a2287c942629ce36635204eb18faa74db2470514" +checksum = "2311edba67657d9fe03bea5c2934e75cb63b5e9fdf2dfd6e26e4f9151f762eb3" dependencies = [ "aws-lc-rs", "base64 0.22.1", diff --git a/crates/common/Cargo.toml b/crates/common/Cargo.toml index 365ba3be..855605fd 100644 --- a/crates/common/Cargo.toml +++ b/crates/common/Cargo.toml @@ -20,7 +20,7 @@ mail-parser = { version = "0.11", features = ["full_encoding"] } mail-builder = { version = "0.4" } mail-auth = { version = "0.9", features = ["generate"] } smtp-proto = { version = "0.2", features = ["rkyv"] } -dns-update = { version = "0.3" } +dns-update = { version = "0.4.0" } calcard = { version = "0.3", features = ["rkyv"] } ahash = { version = "0.8.2", features = ["serde"] } parking_lot = "0.12.1" diff --git a/crates/common/src/network/dns/update.rs b/crates/common/src/network/dns/update.rs index 6e896167..d0185465 100644 --- a/crates/common/src/network/dns/update.rs +++ b/crates/common/src/network/dns/update.rs @@ -75,23 +75,19 @@ impl DnsUpdater { ) .map_err(|err| format!("Failed to build DNS updater: {}", err))?, }), - DnsServer::Sig0(_) => { - Err("RFC 2136 with SIG(0) authentication is no longer supported".into()) - } DnsServer::Cloudflare(server) => { let updater = { #[cfg(feature = "test_mode")] - match server.email.as_deref() { - Some("test@pebble.org") => dns_update::DnsUpdater::new_pebble( + match server.secret.secret().await.unwrap().as_ref() { + "test@pebble.org" => dns_update::DnsUpdater::new_pebble( "http://localhost:8055", server.timeout.into_inner().into(), ), - Some("test@memory.org") => { + "test@memory.org" => { dns_update::DnsUpdater::new_in_memory(DNS_RECORDS.clone()) } _ => dns_update::DnsUpdater::new_cloudflare( server.secret.secret().await?, - server.email, server.timeout.into_inner().into(), ) .map_err(|err| format!("Failed to build DNS updater: {}", err))?, @@ -100,7 +96,6 @@ impl DnsUpdater { #[cfg(not(feature = "test_mode"))] dns_update::DnsUpdater::new_cloudflare( server.secret.secret().await?, - server.email, server.timeout.into_inner().into(), ) .map_err(|err| format!("Failed to build DNS updater: {}", err))? @@ -181,7 +176,7 @@ impl DnsUpdater { core, updater: dns_update::DnsUpdater::new_porkbun( server.api_key.as_str(), - server.secret.secret().await?, + server.secret_api_key.secret().await?, server.timeout.into_inner().into(), ) .map_err(|err| format!("Failed to build DNS updater: {}", err))?, @@ -193,7 +188,7 @@ impl DnsUpdater { ttl: server.ttl.into_inner(), core, updater: dns_update::DnsUpdater::new_dnsimple( - server.secret.secret().await?, + server.auth_token.secret().await?, server.account_identifier.as_str(), server.timeout.into_inner().into(), ) @@ -253,6 +248,869 @@ impl DnsUpdater { .map_err(|err| format!("Failed to build DNS updater: {}", err))?, }) } + DnsServer::Alidns(server) => { + let secret_key = server.secret_key.secret().await?.into_owned(); + let security_token = server + .security_token + .secret() + .await? + .map(|c| c.into_owned()); + Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_alidns( + server.access_key.as_str(), + secret_key.as_str(), + server.region.as_deref(), + security_token.as_deref(), + server.line.as_deref(), + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }) + } + DnsServer::ArvanCloud(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_arvancloud( + server.secret.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::Autodns(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_autodns( + server.username.as_str(), + server.password.secret().await?, + server.context.map(|v| v as u32), + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::AzureDns(server) => { + let client_secret = server.client_secret.secret().await?.into_owned(); + let config = dns_update::providers::azuredns::AzureDnsConfig { + tenant_id: server.tenant_id, + client_id: server.client_id, + client_secret, + subscription_id: server.subscription_id, + resource_group: server.resource_group, + environment: match server.environment { + enums::AzureEnvironment::Public => { + dns_update::providers::azuredns::AzureEnvironment::Public + } + enums::AzureEnvironment::China => { + dns_update::providers::azuredns::AzureEnvironment::China + } + enums::AzureEnvironment::UsGovernment => { + dns_update::providers::azuredns::AzureEnvironment::UsGovernment + } + }, + request_timeout: Some(server.timeout.into_inner()), + }; + Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_azuredns(config) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }) + } + DnsServer::BaiduCloud(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_baiducloud( + server.access_key.as_str(), + server.secret_key.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::BluecatV2(server) => { + let password = server.password.secret().await?.into_owned(); + let config = dns_update::providers::bluecatv2::BluecatV2Config { + server_url: server.base_url, + username: server.username, + password, + config_name: server.config_name, + view_name: server.view_name, + skip_deploy: server.skip_deploy, + request_timeout: Some(server.timeout.into_inner()), + }; + Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_bluecatv2(config) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }) + } + DnsServer::ClouDns(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_cloudns( + server.auth_id.as_deref(), + server.sub_auth_id.as_deref(), + server.password.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::Constellix(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_constellix( + server.api_key.as_str(), + server.secret_key.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::Cpanel(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_cpanel( + server.base_url.as_str(), + server.username.as_str(), + server.token.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::Ddnss(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_ddnss( + server.secret.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::DnsMadeEasy(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_dnsmadeeasy( + server.api_key.as_str(), + server.secret.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::Domeneshop(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_domeneshop( + server.auth_token.as_str(), + server.secret.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::Dreamhost(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_dreamhost( + server.secret.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::DuckDns(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_duckdns( + server.secret.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::Dynu(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_dynu( + server.secret.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::EasyDns(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_easydns( + server.token.as_str(), + server.key.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::EdgeDns(server) => { + let client_secret = server.client_secret.secret().await?.into_owned(); + let access_token = server.access_token.secret().await?.into_owned(); + let config = dns_update::providers::edgedns::EdgeDnsConfig { + host: server.host, + client_token: server.client_token, + client_secret, + access_token, + account_switch_key: server.account_switch_key, + request_timeout: Some(server.timeout.into_inner()), + }; + Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_edgedns(config) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }) + } + DnsServer::Exoscale(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_exoscale( + server.api_key.as_str(), + server.secret.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::FreeMyIp(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_freemyip( + server.secret.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::GandiV5(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_gandiv5( + server.secret.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::Gcore(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_gcore( + server.secret.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::Glesys(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_glesys( + server.api_user.as_str(), + server.api_key.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::Godaddy(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_godaddy( + server.api_key.as_str(), + server.secret.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::Hetzner(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_hetzner( + server.secret.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::HostingDe(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_hostingde( + server.secret.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::Hostinger(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_hostinger( + server.secret.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::HuaweiCloud(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_huaweicloud( + server.access_key.as_str(), + server.secret_key.secret().await?, + server.region.as_str(), + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::Hurricane(server) => { + let mut credentials = std::collections::HashMap::new(); + for cred in server.credentials.0.into_values() { + let secret = cred.secret.secret().await?.into_owned(); + credentials.insert(cred.zone, secret); + } + Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_hurricane( + credentials, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }) + } + DnsServer::IbmCloud(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_ibmcloud( + server.username.as_str(), + server.api_key.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::Infoblox(server) => { + let password = server.password.secret().await?.into_owned(); + let config = dns_update::providers::infoblox::InfobloxConfig { + host: server.host, + port: server.port, + username: server.username, + password, + wapi_version: server.wapi_version, + dns_view: server.dns_view, + request_timeout: Some(server.timeout.into_inner()), + }; + Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_infoblox(config) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }) + } + DnsServer::Infomaniak(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_infomaniak( + server.secret.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::Inwx(server) => { + let password = server.password.secret().await?.into_owned(); + let shared_secret = server.shared_secret.secret().await?.map(|c| c.into_owned()); + Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_inwx( + server.username, + password, + shared_secret, + server.sandbox, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }) + } + DnsServer::Ionos(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_ionos( + server.secret.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::Ipv64(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_ipv64( + server.secret.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::Joker(server) => { + let auth = match server.auth { + registry::schema::structs::JokerAuth::ApiKey(api) => { + let key = api.api_key.secret().await?.into_owned(); + dns_update::providers::joker::JokerAuth::api_key(key) + } + registry::schema::structs::JokerAuth::UsernamePassword(creds) => { + let password = creds.password.secret().await?.into_owned(); + dns_update::providers::joker::JokerAuth::username_password( + creds.username, + password, + ) + } + }; + Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_joker( + auth, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }) + } + DnsServer::Lightsail(server) => { + let secret_access_key = server.secret_access_key.secret().await?.into_owned(); + let session_token = server.session_token.secret().await?.map(|c| c.into_owned()); + let config = dns_update::providers::lightsail::LightsailConfig { + access_key_id: server.access_key_id, + secret_access_key, + session_token, + region: server.region, + domain: server.domain, + request_timeout: Some(server.timeout.into_inner()), + }; + Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_lightsail(config) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }) + } + DnsServer::Linode(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_linode( + server.secret.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::LuaDns(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_luadns( + server.username.as_str(), + server.auth_token.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::MythicBeasts(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_mythicbeasts( + server.username.as_str(), + server.password.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::Namecheap(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_namecheap( + server.api_user.as_str(), + server.api_key.secret().await?, + server.client_ip.as_str(), + server.username.as_deref(), + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::NameDotCom(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_namedotcom( + server.username.as_str(), + server.auth_token.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::NameSilo(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_namesilo( + server.secret.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::Netcup(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_netcup( + server.customer_number.as_str(), + server.api_key.as_str(), + server.password.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::Netlify(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_netlify( + server.secret.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::Nifcloud(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_nifcloud( + server.access_key.as_str(), + server.secret_key.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::Ns1(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_ns1( + server.secret.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::OracleCloud(server) => { + let private_key_pem = server.private_key_pem.secret().await?.into_owned(); + let private_key_password = server + .private_key_password + .secret() + .await? + .map(|c| c.into_owned()); + let config = dns_update::providers::oraclecloud::OracleCloudConfig { + tenancy_ocid: server.tenancy_ocid, + user_ocid: server.user_ocid, + fingerprint: server.fingerprint, + private_key_pem, + private_key_password, + region: server.region, + compartment_ocid: server.compartment_ocid, + request_timeout: Some(server.timeout.into_inner()), + }; + Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_oraclecloud(config) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }) + } + DnsServer::Plesk(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_plesk( + server.base_url.as_str(), + server.api_key.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::Safedns(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_safedns( + server.secret.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::Scaleway(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_scaleway( + server.secret.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::TencentCloud(server) => { + let secret_key = server.secret_key.secret().await?.into_owned(); + let session_token = server.session_token.secret().await?.map(|c| c.into_owned()); + Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_tencentcloud( + server.secret_id.as_str(), + secret_key.as_str(), + server.region.as_deref(), + session_token.as_deref(), + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }) + } + DnsServer::Transip(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_transip( + server.username.as_str(), + server.private_key_pem.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::UltraDns(server) => { + let password = server.password.secret().await?.into_owned(); + Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_ultradns( + server.username, + password, + server.endpoint, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }) + } + DnsServer::Vercel(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_vercel( + server.auth_token.secret().await?, + server.team_id.as_deref(), + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::Volcengine(server) => { + let secret_key = server.secret_key.secret().await?.into_owned(); + let config = dns_update::providers::volcengine::VolcengineConfig { + access_key: server.access_key, + secret_key, + region: server.region, + host: server.host, + scheme: server.scheme, + request_timeout: Some(server.timeout.into_inner()), + }; + Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_volcengine(config) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }) + } + DnsServer::Vultr(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_vultr( + server.secret.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::WebSupport(server) => Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_websupport( + server.api_key.as_str(), + server.secret.secret().await?, + server.timeout.into_inner().into(), + ) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }), + DnsServer::YandexCloud(server) => { + let iam_token_b64 = server.api_key.secret().await?.into_owned(); + let config = dns_update::providers::yandexcloud::YandexCloudConfig { + iam_token_b64, + folder_id: server.folder_id, + request_timeout: Some(server.timeout.into_inner()), + }; + Ok(DnsUpdater { + polling_interval: server.polling_interval.into_inner(), + propagation_timeout: server.propagation_timeout.into_inner(), + propagation_delay: server.propagation_delay.map(|d| d.into_inner()), + ttl: server.ttl.into_inner(), + core, + updater: dns_update::DnsUpdater::new_yandexcloud(config) + .map_err(|err| format!("Failed to build DNS updater: {}", err))?, + }) + } + DnsServer::Deprecated1 => Err("DNS server type no longer supported".to_string()), } } @@ -292,7 +1150,7 @@ impl DnsUpdater { Hostname = name.to_string(), Details = origin.to_string(), Type = record.as_type().as_str(), - Value = format!("{:?}", record), + Value = record.to_string(), ); if verify && let DnsRecord::TXT(txt_record) = &record { @@ -324,7 +1182,7 @@ impl DnsUpdater { Details = origin.to_string(), Result = result.to_string(), Type = record.as_type().as_str(), - Value = format!("{:?}", record), + Value = record.to_string(), ); } } @@ -335,7 +1193,7 @@ impl DnsUpdater { Details = origin.to_string(), Reason = err.to_string(), Type = record.as_type().as_str(), - Value = format!("{:?}", record), + Value = record.to_string(), ); } } @@ -349,7 +1207,7 @@ impl DnsUpdater { Hostname = name.to_string(), Details = origin.to_string(), Type = record.as_type().as_str(), - Value = format!("{:?}", record), + Value = record.to_string(), ); } else { trc::event!( @@ -357,7 +1215,7 @@ impl DnsUpdater { Hostname = name.to_string(), Details = origin.to_string(), Type = record.as_type().as_str(), - Value = format!("{:?}", record), + Value = record.to_string(), ); } diff --git a/crates/jmap/src/registry/mapping/bootstrap.rs b/crates/jmap/src/registry/mapping/bootstrap.rs index c00a4244..06f7ff50 100644 --- a/crates/jmap/src/registry/mapping/bootstrap.rs +++ b/crates/jmap/src/registry/mapping/bootstrap.rs @@ -543,13 +543,10 @@ fn map_directory(directory: &DirectoryBootstrap) -> Option { fn map_dns_server(dns_server: &DnsServerBootstrap) -> Option { match dns_server { - DnsServerBootstrap::Manual => None, + DnsServerBootstrap::Manual | DnsServerBootstrap::Deprecated1 => None, DnsServerBootstrap::Tsig(dns_server_tsig) => { DnsServer::Tsig(dns_server_tsig.clone()).into() } - DnsServerBootstrap::Sig0(dns_server_sig0) => { - DnsServer::Sig0(dns_server_sig0.clone()).into() - } DnsServerBootstrap::Cloudflare(dns_server_cloudflare) => { DnsServer::Cloudflare(dns_server_cloudflare.clone()).into() } @@ -578,6 +575,64 @@ fn map_dns_server(dns_server: &DnsServerBootstrap) -> Option { DnsServer::GoogleCloudDns(dns_server_google_cloud_dns.clone()).into() } + DnsServerBootstrap::Alidns(inner) => DnsServer::Alidns(inner.clone()).into(), + DnsServerBootstrap::ArvanCloud(inner) => DnsServer::ArvanCloud(inner.clone()).into(), + DnsServerBootstrap::Autodns(inner) => DnsServer::Autodns(inner.clone()).into(), + DnsServerBootstrap::AzureDns(inner) => DnsServer::AzureDns(inner.clone()).into(), + DnsServerBootstrap::BaiduCloud(inner) => DnsServer::BaiduCloud(inner.clone()).into(), + DnsServerBootstrap::BluecatV2(inner) => DnsServer::BluecatV2(inner.clone()).into(), + DnsServerBootstrap::ClouDns(inner) => DnsServer::ClouDns(inner.clone()).into(), + DnsServerBootstrap::Constellix(inner) => DnsServer::Constellix(inner.clone()).into(), + DnsServerBootstrap::Cpanel(inner) => DnsServer::Cpanel(inner.clone()).into(), + DnsServerBootstrap::Ddnss(inner) => DnsServer::Ddnss(inner.clone()).into(), + DnsServerBootstrap::DnsMadeEasy(inner) => DnsServer::DnsMadeEasy(inner.clone()).into(), + DnsServerBootstrap::Domeneshop(inner) => DnsServer::Domeneshop(inner.clone()).into(), + DnsServerBootstrap::Dreamhost(inner) => DnsServer::Dreamhost(inner.clone()).into(), + DnsServerBootstrap::DuckDns(inner) => DnsServer::DuckDns(inner.clone()).into(), + DnsServerBootstrap::Dynu(inner) => DnsServer::Dynu(inner.clone()).into(), + DnsServerBootstrap::EasyDns(inner) => DnsServer::EasyDns(inner.clone()).into(), + DnsServerBootstrap::EdgeDns(inner) => DnsServer::EdgeDns(inner.clone()).into(), + DnsServerBootstrap::Exoscale(inner) => DnsServer::Exoscale(inner.clone()).into(), + DnsServerBootstrap::FreeMyIp(inner) => DnsServer::FreeMyIp(inner.clone()).into(), + DnsServerBootstrap::GandiV5(inner) => DnsServer::GandiV5(inner.clone()).into(), + DnsServerBootstrap::Gcore(inner) => DnsServer::Gcore(inner.clone()).into(), + DnsServerBootstrap::Glesys(inner) => DnsServer::Glesys(inner.clone()).into(), + DnsServerBootstrap::Godaddy(inner) => DnsServer::Godaddy(inner.clone()).into(), + DnsServerBootstrap::Hetzner(inner) => DnsServer::Hetzner(inner.clone()).into(), + DnsServerBootstrap::HostingDe(inner) => DnsServer::HostingDe(inner.clone()).into(), + DnsServerBootstrap::Hostinger(inner) => DnsServer::Hostinger(inner.clone()).into(), + DnsServerBootstrap::HuaweiCloud(inner) => DnsServer::HuaweiCloud(inner.clone()).into(), + DnsServerBootstrap::Hurricane(inner) => DnsServer::Hurricane(inner.clone()).into(), + DnsServerBootstrap::IbmCloud(inner) => DnsServer::IbmCloud(inner.clone()).into(), + DnsServerBootstrap::Infoblox(inner) => DnsServer::Infoblox(inner.clone()).into(), + DnsServerBootstrap::Infomaniak(inner) => DnsServer::Infomaniak(inner.clone()).into(), + DnsServerBootstrap::Inwx(inner) => DnsServer::Inwx(inner.clone()).into(), + DnsServerBootstrap::Ionos(inner) => DnsServer::Ionos(inner.clone()).into(), + DnsServerBootstrap::Ipv64(inner) => DnsServer::Ipv64(inner.clone()).into(), + DnsServerBootstrap::Joker(inner) => DnsServer::Joker(inner.clone()).into(), + DnsServerBootstrap::Lightsail(inner) => DnsServer::Lightsail(inner.clone()).into(), + DnsServerBootstrap::Linode(inner) => DnsServer::Linode(inner.clone()).into(), + DnsServerBootstrap::LuaDns(inner) => DnsServer::LuaDns(inner.clone()).into(), + DnsServerBootstrap::MythicBeasts(inner) => DnsServer::MythicBeasts(inner.clone()).into(), + DnsServerBootstrap::Namecheap(inner) => DnsServer::Namecheap(inner.clone()).into(), + DnsServerBootstrap::NameDotCom(inner) => DnsServer::NameDotCom(inner.clone()).into(), + DnsServerBootstrap::NameSilo(inner) => DnsServer::NameSilo(inner.clone()).into(), + DnsServerBootstrap::Netcup(inner) => DnsServer::Netcup(inner.clone()).into(), + DnsServerBootstrap::Netlify(inner) => DnsServer::Netlify(inner.clone()).into(), + DnsServerBootstrap::Nifcloud(inner) => DnsServer::Nifcloud(inner.clone()).into(), + DnsServerBootstrap::Ns1(inner) => DnsServer::Ns1(inner.clone()).into(), + DnsServerBootstrap::OracleCloud(inner) => DnsServer::OracleCloud(inner.clone()).into(), + DnsServerBootstrap::Plesk(inner) => DnsServer::Plesk(inner.clone()).into(), + DnsServerBootstrap::Safedns(inner) => DnsServer::Safedns(inner.clone()).into(), + DnsServerBootstrap::Scaleway(inner) => DnsServer::Scaleway(inner.clone()).into(), + DnsServerBootstrap::TencentCloud(inner) => DnsServer::TencentCloud(inner.clone()).into(), + DnsServerBootstrap::Transip(inner) => DnsServer::Transip(inner.clone()).into(), + DnsServerBootstrap::UltraDns(inner) => DnsServer::UltraDns(inner.clone()).into(), + DnsServerBootstrap::Vercel(inner) => DnsServer::Vercel(inner.clone()).into(), + DnsServerBootstrap::Volcengine(inner) => DnsServer::Volcengine(inner.clone()).into(), + DnsServerBootstrap::Vultr(inner) => DnsServer::Vultr(inner.clone()).into(), + DnsServerBootstrap::WebSupport(inner) => DnsServer::WebSupport(inner.clone()).into(), + DnsServerBootstrap::YandexCloud(inner) => DnsServer::YandexCloud(inner.clone()).into(), } } diff --git a/crates/registry/src/schema/enums.rs b/crates/registry/src/schema/enums.rs index 28f2743c..a311b330 100644 --- a/crates/registry/src/schema/enums.rs +++ b/crates/registry/src/schema/enums.rs @@ -151,6 +151,15 @@ pub enum AsnType { Dns = 2, } +#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] +#[repr(u16)] +pub enum AzureEnvironment { + #[default] + Public = 0, + China = 1, + UsGovernment = 2, +} + #[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[repr(u16)] pub enum BlobStoreBaseType { @@ -518,7 +527,7 @@ pub enum DnsServerBootstrapType { #[default] Manual = 0, Tsig = 1, - Sig0 = 2, + Deprecated1 = 2, Cloudflare = 3, DigitalOcean = 4, DeSEC = 5, @@ -529,6 +538,64 @@ pub enum DnsServerBootstrapType { Spaceship = 10, Route53 = 11, GoogleCloudDns = 12, + Alidns = 13, + ArvanCloud = 14, + Autodns = 15, + AzureDns = 16, + BaiduCloud = 17, + BluecatV2 = 18, + ClouDns = 19, + Constellix = 20, + Cpanel = 21, + Ddnss = 22, + DnsMadeEasy = 23, + Domeneshop = 24, + Dreamhost = 25, + DuckDns = 26, + Dynu = 27, + EasyDns = 28, + EdgeDns = 29, + Exoscale = 30, + FreeMyIp = 31, + GandiV5 = 32, + Gcore = 33, + Glesys = 34, + Godaddy = 35, + Hetzner = 36, + HostingDe = 37, + Hostinger = 38, + HuaweiCloud = 39, + Hurricane = 40, + IbmCloud = 41, + Infoblox = 42, + Infomaniak = 43, + Inwx = 44, + Ionos = 45, + Ipv64 = 46, + Joker = 47, + Lightsail = 48, + Linode = 49, + LuaDns = 50, + MythicBeasts = 51, + Namecheap = 52, + NameDotCom = 53, + NameSilo = 54, + Netcup = 55, + Netlify = 56, + Nifcloud = 57, + Ns1 = 58, + OracleCloud = 59, + Plesk = 60, + Safedns = 61, + Scaleway = 62, + TencentCloud = 63, + Transip = 64, + UltraDns = 65, + Vercel = 66, + Volcengine = 67, + Vultr = 68, + WebSupport = 69, + YandexCloud = 70, } #[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] @@ -536,7 +603,7 @@ pub enum DnsServerBootstrapType { pub enum DnsServerType { #[default] Tsig = 0, - Sig0 = 1, + Deprecated1 = 1, Cloudflare = 2, DigitalOcean = 3, DeSEC = 4, @@ -547,6 +614,64 @@ pub enum DnsServerType { Spaceship = 9, Route53 = 10, GoogleCloudDns = 11, + Alidns = 12, + ArvanCloud = 13, + Autodns = 14, + AzureDns = 15, + BaiduCloud = 16, + BluecatV2 = 17, + ClouDns = 18, + Constellix = 19, + Cpanel = 20, + Ddnss = 21, + DnsMadeEasy = 22, + Domeneshop = 23, + Dreamhost = 24, + DuckDns = 25, + Dynu = 26, + EasyDns = 27, + EdgeDns = 28, + Exoscale = 29, + FreeMyIp = 30, + GandiV5 = 31, + Gcore = 32, + Glesys = 33, + Godaddy = 34, + Hetzner = 35, + HostingDe = 36, + Hostinger = 37, + HuaweiCloud = 38, + Hurricane = 39, + IbmCloud = 40, + Infoblox = 41, + Infomaniak = 42, + Inwx = 43, + Ionos = 44, + Ipv64 = 45, + Joker = 46, + Lightsail = 47, + Linode = 48, + LuaDns = 49, + MythicBeasts = 50, + Namecheap = 51, + NameDotCom = 52, + NameSilo = 53, + Netcup = 54, + Netlify = 55, + Nifcloud = 56, + Ns1 = 57, + OracleCloud = 58, + Plesk = 59, + Safedns = 60, + Scaleway = 61, + TencentCloud = 62, + Transip = 63, + UltraDns = 64, + Vercel = 65, + Volcengine = 66, + Vultr = 67, + WebSupport = 68, + YandexCloud = 69, } #[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] @@ -751,6 +876,14 @@ pub enum IpProtocol { Tcp = 1, } +#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] +#[repr(u16)] +pub enum JokerAuthType { + #[default] + ApiKey = 0, + UsernamePassword = 1, +} + #[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[repr(u16)] pub enum JwtSignatureAlgorithm { diff --git a/crates/registry/src/schema/enums_impl.rs b/crates/registry/src/schema/enums_impl.rs index f6ce64aa..72ac8ca4 100644 --- a/crates/registry/src/schema/enums_impl.rs +++ b/crates/registry/src/schema/enums_impl.rs @@ -807,6 +807,59 @@ impl<'de> serde::Deserialize<'de> for AsnType { } } +impl EnumImpl for AzureEnvironment { + fn parse(value: &str) -> Option { + hashify::tiny_map! { + value.as_bytes(), + b"public" => AzureEnvironment::Public, + b"china" => AzureEnvironment::China, + b"us-government" => AzureEnvironment::UsGovernment, + } + } + + fn as_str(&self) -> &'static str { + match self { + AzureEnvironment::Public => "public", + AzureEnvironment::China => "china", + AzureEnvironment::UsGovernment => "us-government", + } + } + + fn to_id(&self) -> u16 { + *self as u16 + } + + fn from_id(id: u16) -> Option { + match id { + 0 => Some(AzureEnvironment::Public), + 1 => Some(AzureEnvironment::China), + 2 => Some(AzureEnvironment::UsGovernment), + _ => None, + } + } + + const COUNT: usize = 3; +} + +impl serde::Serialize for AzureEnvironment { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de> serde::Deserialize<'de> for AzureEnvironment { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = Cow::::deserialize(deserializer)?; + Self::parse(&s).ok_or_else(|| serde::de::Error::unknown_variant(&s, &[])) + } +} + impl EnumImpl for BlobStoreBaseType { fn parse(value: &str) -> Option { hashify::tiny_map! { @@ -2776,11 +2829,12 @@ impl<'de> serde::Deserialize<'de> for DnsResolverType { impl EnumImpl for DnsServerBootstrapType { fn parse(value: &str) -> Option { - hashify::tiny_map! { + hashify::map! { value.as_bytes(), + DnsServerBootstrapType, b"Manual" => DnsServerBootstrapType::Manual, b"Tsig" => DnsServerBootstrapType::Tsig, - b"Sig0" => DnsServerBootstrapType::Sig0, + b"Deprecated1" => DnsServerBootstrapType::Deprecated1, b"Cloudflare" => DnsServerBootstrapType::Cloudflare, b"DigitalOcean" => DnsServerBootstrapType::DigitalOcean, b"DeSEC" => DnsServerBootstrapType::DeSEC, @@ -2791,14 +2845,73 @@ impl EnumImpl for DnsServerBootstrapType { b"Spaceship" => DnsServerBootstrapType::Spaceship, b"Route53" => DnsServerBootstrapType::Route53, b"GoogleCloudDns" => DnsServerBootstrapType::GoogleCloudDns, + b"Alidns" => DnsServerBootstrapType::Alidns, + b"ArvanCloud" => DnsServerBootstrapType::ArvanCloud, + b"Autodns" => DnsServerBootstrapType::Autodns, + b"AzureDns" => DnsServerBootstrapType::AzureDns, + b"BaiduCloud" => DnsServerBootstrapType::BaiduCloud, + b"BluecatV2" => DnsServerBootstrapType::BluecatV2, + b"ClouDns" => DnsServerBootstrapType::ClouDns, + b"Constellix" => DnsServerBootstrapType::Constellix, + b"Cpanel" => DnsServerBootstrapType::Cpanel, + b"Ddnss" => DnsServerBootstrapType::Ddnss, + b"DnsMadeEasy" => DnsServerBootstrapType::DnsMadeEasy, + b"Domeneshop" => DnsServerBootstrapType::Domeneshop, + b"Dreamhost" => DnsServerBootstrapType::Dreamhost, + b"DuckDns" => DnsServerBootstrapType::DuckDns, + b"Dynu" => DnsServerBootstrapType::Dynu, + b"EasyDns" => DnsServerBootstrapType::EasyDns, + b"EdgeDns" => DnsServerBootstrapType::EdgeDns, + b"Exoscale" => DnsServerBootstrapType::Exoscale, + b"FreeMyIp" => DnsServerBootstrapType::FreeMyIp, + b"GandiV5" => DnsServerBootstrapType::GandiV5, + b"Gcore" => DnsServerBootstrapType::Gcore, + b"Glesys" => DnsServerBootstrapType::Glesys, + b"Godaddy" => DnsServerBootstrapType::Godaddy, + b"Hetzner" => DnsServerBootstrapType::Hetzner, + b"HostingDe" => DnsServerBootstrapType::HostingDe, + b"Hostinger" => DnsServerBootstrapType::Hostinger, + b"HuaweiCloud" => DnsServerBootstrapType::HuaweiCloud, + b"Hurricane" => DnsServerBootstrapType::Hurricane, + b"IbmCloud" => DnsServerBootstrapType::IbmCloud, + b"Infoblox" => DnsServerBootstrapType::Infoblox, + b"Infomaniak" => DnsServerBootstrapType::Infomaniak, + b"Inwx" => DnsServerBootstrapType::Inwx, + b"Ionos" => DnsServerBootstrapType::Ionos, + b"Ipv64" => DnsServerBootstrapType::Ipv64, + b"Joker" => DnsServerBootstrapType::Joker, + b"Lightsail" => DnsServerBootstrapType::Lightsail, + b"Linode" => DnsServerBootstrapType::Linode, + b"LuaDns" => DnsServerBootstrapType::LuaDns, + b"MythicBeasts" => DnsServerBootstrapType::MythicBeasts, + b"Namecheap" => DnsServerBootstrapType::Namecheap, + b"NameDotCom" => DnsServerBootstrapType::NameDotCom, + b"NameSilo" => DnsServerBootstrapType::NameSilo, + b"Netcup" => DnsServerBootstrapType::Netcup, + b"Netlify" => DnsServerBootstrapType::Netlify, + b"Nifcloud" => DnsServerBootstrapType::Nifcloud, + b"Ns1" => DnsServerBootstrapType::Ns1, + b"OracleCloud" => DnsServerBootstrapType::OracleCloud, + b"Plesk" => DnsServerBootstrapType::Plesk, + b"Safedns" => DnsServerBootstrapType::Safedns, + b"Scaleway" => DnsServerBootstrapType::Scaleway, + b"TencentCloud" => DnsServerBootstrapType::TencentCloud, + b"Transip" => DnsServerBootstrapType::Transip, + b"UltraDns" => DnsServerBootstrapType::UltraDns, + b"Vercel" => DnsServerBootstrapType::Vercel, + b"Volcengine" => DnsServerBootstrapType::Volcengine, + b"Vultr" => DnsServerBootstrapType::Vultr, + b"WebSupport" => DnsServerBootstrapType::WebSupport, + b"YandexCloud" => DnsServerBootstrapType::YandexCloud, } + .copied() } fn as_str(&self) -> &'static str { match self { DnsServerBootstrapType::Manual => "Manual", DnsServerBootstrapType::Tsig => "Tsig", - DnsServerBootstrapType::Sig0 => "Sig0", + DnsServerBootstrapType::Deprecated1 => "Deprecated1", DnsServerBootstrapType::Cloudflare => "Cloudflare", DnsServerBootstrapType::DigitalOcean => "DigitalOcean", DnsServerBootstrapType::DeSEC => "DeSEC", @@ -2809,6 +2922,64 @@ impl EnumImpl for DnsServerBootstrapType { DnsServerBootstrapType::Spaceship => "Spaceship", DnsServerBootstrapType::Route53 => "Route53", DnsServerBootstrapType::GoogleCloudDns => "GoogleCloudDns", + DnsServerBootstrapType::Alidns => "Alidns", + DnsServerBootstrapType::ArvanCloud => "ArvanCloud", + DnsServerBootstrapType::Autodns => "Autodns", + DnsServerBootstrapType::AzureDns => "AzureDns", + DnsServerBootstrapType::BaiduCloud => "BaiduCloud", + DnsServerBootstrapType::BluecatV2 => "BluecatV2", + DnsServerBootstrapType::ClouDns => "ClouDns", + DnsServerBootstrapType::Constellix => "Constellix", + DnsServerBootstrapType::Cpanel => "Cpanel", + DnsServerBootstrapType::Ddnss => "Ddnss", + DnsServerBootstrapType::DnsMadeEasy => "DnsMadeEasy", + DnsServerBootstrapType::Domeneshop => "Domeneshop", + DnsServerBootstrapType::Dreamhost => "Dreamhost", + DnsServerBootstrapType::DuckDns => "DuckDns", + DnsServerBootstrapType::Dynu => "Dynu", + DnsServerBootstrapType::EasyDns => "EasyDns", + DnsServerBootstrapType::EdgeDns => "EdgeDns", + DnsServerBootstrapType::Exoscale => "Exoscale", + DnsServerBootstrapType::FreeMyIp => "FreeMyIp", + DnsServerBootstrapType::GandiV5 => "GandiV5", + DnsServerBootstrapType::Gcore => "Gcore", + DnsServerBootstrapType::Glesys => "Glesys", + DnsServerBootstrapType::Godaddy => "Godaddy", + DnsServerBootstrapType::Hetzner => "Hetzner", + DnsServerBootstrapType::HostingDe => "HostingDe", + DnsServerBootstrapType::Hostinger => "Hostinger", + DnsServerBootstrapType::HuaweiCloud => "HuaweiCloud", + DnsServerBootstrapType::Hurricane => "Hurricane", + DnsServerBootstrapType::IbmCloud => "IbmCloud", + DnsServerBootstrapType::Infoblox => "Infoblox", + DnsServerBootstrapType::Infomaniak => "Infomaniak", + DnsServerBootstrapType::Inwx => "Inwx", + DnsServerBootstrapType::Ionos => "Ionos", + DnsServerBootstrapType::Ipv64 => "Ipv64", + DnsServerBootstrapType::Joker => "Joker", + DnsServerBootstrapType::Lightsail => "Lightsail", + DnsServerBootstrapType::Linode => "Linode", + DnsServerBootstrapType::LuaDns => "LuaDns", + DnsServerBootstrapType::MythicBeasts => "MythicBeasts", + DnsServerBootstrapType::Namecheap => "Namecheap", + DnsServerBootstrapType::NameDotCom => "NameDotCom", + DnsServerBootstrapType::NameSilo => "NameSilo", + DnsServerBootstrapType::Netcup => "Netcup", + DnsServerBootstrapType::Netlify => "Netlify", + DnsServerBootstrapType::Nifcloud => "Nifcloud", + DnsServerBootstrapType::Ns1 => "Ns1", + DnsServerBootstrapType::OracleCloud => "OracleCloud", + DnsServerBootstrapType::Plesk => "Plesk", + DnsServerBootstrapType::Safedns => "Safedns", + DnsServerBootstrapType::Scaleway => "Scaleway", + DnsServerBootstrapType::TencentCloud => "TencentCloud", + DnsServerBootstrapType::Transip => "Transip", + DnsServerBootstrapType::UltraDns => "UltraDns", + DnsServerBootstrapType::Vercel => "Vercel", + DnsServerBootstrapType::Volcengine => "Volcengine", + DnsServerBootstrapType::Vultr => "Vultr", + DnsServerBootstrapType::WebSupport => "WebSupport", + DnsServerBootstrapType::YandexCloud => "YandexCloud", } } @@ -2820,7 +2991,7 @@ impl EnumImpl for DnsServerBootstrapType { match id { 0 => Some(DnsServerBootstrapType::Manual), 1 => Some(DnsServerBootstrapType::Tsig), - 2 => Some(DnsServerBootstrapType::Sig0), + 2 => Some(DnsServerBootstrapType::Deprecated1), 3 => Some(DnsServerBootstrapType::Cloudflare), 4 => Some(DnsServerBootstrapType::DigitalOcean), 5 => Some(DnsServerBootstrapType::DeSEC), @@ -2831,11 +3002,69 @@ impl EnumImpl for DnsServerBootstrapType { 10 => Some(DnsServerBootstrapType::Spaceship), 11 => Some(DnsServerBootstrapType::Route53), 12 => Some(DnsServerBootstrapType::GoogleCloudDns), + 13 => Some(DnsServerBootstrapType::Alidns), + 14 => Some(DnsServerBootstrapType::ArvanCloud), + 15 => Some(DnsServerBootstrapType::Autodns), + 16 => Some(DnsServerBootstrapType::AzureDns), + 17 => Some(DnsServerBootstrapType::BaiduCloud), + 18 => Some(DnsServerBootstrapType::BluecatV2), + 19 => Some(DnsServerBootstrapType::ClouDns), + 20 => Some(DnsServerBootstrapType::Constellix), + 21 => Some(DnsServerBootstrapType::Cpanel), + 22 => Some(DnsServerBootstrapType::Ddnss), + 23 => Some(DnsServerBootstrapType::DnsMadeEasy), + 24 => Some(DnsServerBootstrapType::Domeneshop), + 25 => Some(DnsServerBootstrapType::Dreamhost), + 26 => Some(DnsServerBootstrapType::DuckDns), + 27 => Some(DnsServerBootstrapType::Dynu), + 28 => Some(DnsServerBootstrapType::EasyDns), + 29 => Some(DnsServerBootstrapType::EdgeDns), + 30 => Some(DnsServerBootstrapType::Exoscale), + 31 => Some(DnsServerBootstrapType::FreeMyIp), + 32 => Some(DnsServerBootstrapType::GandiV5), + 33 => Some(DnsServerBootstrapType::Gcore), + 34 => Some(DnsServerBootstrapType::Glesys), + 35 => Some(DnsServerBootstrapType::Godaddy), + 36 => Some(DnsServerBootstrapType::Hetzner), + 37 => Some(DnsServerBootstrapType::HostingDe), + 38 => Some(DnsServerBootstrapType::Hostinger), + 39 => Some(DnsServerBootstrapType::HuaweiCloud), + 40 => Some(DnsServerBootstrapType::Hurricane), + 41 => Some(DnsServerBootstrapType::IbmCloud), + 42 => Some(DnsServerBootstrapType::Infoblox), + 43 => Some(DnsServerBootstrapType::Infomaniak), + 44 => Some(DnsServerBootstrapType::Inwx), + 45 => Some(DnsServerBootstrapType::Ionos), + 46 => Some(DnsServerBootstrapType::Ipv64), + 47 => Some(DnsServerBootstrapType::Joker), + 48 => Some(DnsServerBootstrapType::Lightsail), + 49 => Some(DnsServerBootstrapType::Linode), + 50 => Some(DnsServerBootstrapType::LuaDns), + 51 => Some(DnsServerBootstrapType::MythicBeasts), + 52 => Some(DnsServerBootstrapType::Namecheap), + 53 => Some(DnsServerBootstrapType::NameDotCom), + 54 => Some(DnsServerBootstrapType::NameSilo), + 55 => Some(DnsServerBootstrapType::Netcup), + 56 => Some(DnsServerBootstrapType::Netlify), + 57 => Some(DnsServerBootstrapType::Nifcloud), + 58 => Some(DnsServerBootstrapType::Ns1), + 59 => Some(DnsServerBootstrapType::OracleCloud), + 60 => Some(DnsServerBootstrapType::Plesk), + 61 => Some(DnsServerBootstrapType::Safedns), + 62 => Some(DnsServerBootstrapType::Scaleway), + 63 => Some(DnsServerBootstrapType::TencentCloud), + 64 => Some(DnsServerBootstrapType::Transip), + 65 => Some(DnsServerBootstrapType::UltraDns), + 66 => Some(DnsServerBootstrapType::Vercel), + 67 => Some(DnsServerBootstrapType::Volcengine), + 68 => Some(DnsServerBootstrapType::Vultr), + 69 => Some(DnsServerBootstrapType::WebSupport), + 70 => Some(DnsServerBootstrapType::YandexCloud), _ => None, } } - const COUNT: usize = 13; + const COUNT: usize = 71; } impl serde::Serialize for DnsServerBootstrapType { @@ -2859,10 +3088,11 @@ impl<'de> serde::Deserialize<'de> for DnsServerBootstrapType { impl EnumImpl for DnsServerType { fn parse(value: &str) -> Option { - hashify::tiny_map! { + hashify::map! { value.as_bytes(), + DnsServerType, b"Tsig" => DnsServerType::Tsig, - b"Sig0" => DnsServerType::Sig0, + b"Deprecated1" => DnsServerType::Deprecated1, b"Cloudflare" => DnsServerType::Cloudflare, b"DigitalOcean" => DnsServerType::DigitalOcean, b"DeSEC" => DnsServerType::DeSEC, @@ -2873,13 +3103,72 @@ impl EnumImpl for DnsServerType { b"Spaceship" => DnsServerType::Spaceship, b"Route53" => DnsServerType::Route53, b"GoogleCloudDns" => DnsServerType::GoogleCloudDns, + b"Alidns" => DnsServerType::Alidns, + b"ArvanCloud" => DnsServerType::ArvanCloud, + b"Autodns" => DnsServerType::Autodns, + b"AzureDns" => DnsServerType::AzureDns, + b"BaiduCloud" => DnsServerType::BaiduCloud, + b"BluecatV2" => DnsServerType::BluecatV2, + b"ClouDns" => DnsServerType::ClouDns, + b"Constellix" => DnsServerType::Constellix, + b"Cpanel" => DnsServerType::Cpanel, + b"Ddnss" => DnsServerType::Ddnss, + b"DnsMadeEasy" => DnsServerType::DnsMadeEasy, + b"Domeneshop" => DnsServerType::Domeneshop, + b"Dreamhost" => DnsServerType::Dreamhost, + b"DuckDns" => DnsServerType::DuckDns, + b"Dynu" => DnsServerType::Dynu, + b"EasyDns" => DnsServerType::EasyDns, + b"EdgeDns" => DnsServerType::EdgeDns, + b"Exoscale" => DnsServerType::Exoscale, + b"FreeMyIp" => DnsServerType::FreeMyIp, + b"GandiV5" => DnsServerType::GandiV5, + b"Gcore" => DnsServerType::Gcore, + b"Glesys" => DnsServerType::Glesys, + b"Godaddy" => DnsServerType::Godaddy, + b"Hetzner" => DnsServerType::Hetzner, + b"HostingDe" => DnsServerType::HostingDe, + b"Hostinger" => DnsServerType::Hostinger, + b"HuaweiCloud" => DnsServerType::HuaweiCloud, + b"Hurricane" => DnsServerType::Hurricane, + b"IbmCloud" => DnsServerType::IbmCloud, + b"Infoblox" => DnsServerType::Infoblox, + b"Infomaniak" => DnsServerType::Infomaniak, + b"Inwx" => DnsServerType::Inwx, + b"Ionos" => DnsServerType::Ionos, + b"Ipv64" => DnsServerType::Ipv64, + b"Joker" => DnsServerType::Joker, + b"Lightsail" => DnsServerType::Lightsail, + b"Linode" => DnsServerType::Linode, + b"LuaDns" => DnsServerType::LuaDns, + b"MythicBeasts" => DnsServerType::MythicBeasts, + b"Namecheap" => DnsServerType::Namecheap, + b"NameDotCom" => DnsServerType::NameDotCom, + b"NameSilo" => DnsServerType::NameSilo, + b"Netcup" => DnsServerType::Netcup, + b"Netlify" => DnsServerType::Netlify, + b"Nifcloud" => DnsServerType::Nifcloud, + b"Ns1" => DnsServerType::Ns1, + b"OracleCloud" => DnsServerType::OracleCloud, + b"Plesk" => DnsServerType::Plesk, + b"Safedns" => DnsServerType::Safedns, + b"Scaleway" => DnsServerType::Scaleway, + b"TencentCloud" => DnsServerType::TencentCloud, + b"Transip" => DnsServerType::Transip, + b"UltraDns" => DnsServerType::UltraDns, + b"Vercel" => DnsServerType::Vercel, + b"Volcengine" => DnsServerType::Volcengine, + b"Vultr" => DnsServerType::Vultr, + b"WebSupport" => DnsServerType::WebSupport, + b"YandexCloud" => DnsServerType::YandexCloud, } + .copied() } fn as_str(&self) -> &'static str { match self { DnsServerType::Tsig => "Tsig", - DnsServerType::Sig0 => "Sig0", + DnsServerType::Deprecated1 => "Deprecated1", DnsServerType::Cloudflare => "Cloudflare", DnsServerType::DigitalOcean => "DigitalOcean", DnsServerType::DeSEC => "DeSEC", @@ -2890,6 +3179,64 @@ impl EnumImpl for DnsServerType { DnsServerType::Spaceship => "Spaceship", DnsServerType::Route53 => "Route53", DnsServerType::GoogleCloudDns => "GoogleCloudDns", + DnsServerType::Alidns => "Alidns", + DnsServerType::ArvanCloud => "ArvanCloud", + DnsServerType::Autodns => "Autodns", + DnsServerType::AzureDns => "AzureDns", + DnsServerType::BaiduCloud => "BaiduCloud", + DnsServerType::BluecatV2 => "BluecatV2", + DnsServerType::ClouDns => "ClouDns", + DnsServerType::Constellix => "Constellix", + DnsServerType::Cpanel => "Cpanel", + DnsServerType::Ddnss => "Ddnss", + DnsServerType::DnsMadeEasy => "DnsMadeEasy", + DnsServerType::Domeneshop => "Domeneshop", + DnsServerType::Dreamhost => "Dreamhost", + DnsServerType::DuckDns => "DuckDns", + DnsServerType::Dynu => "Dynu", + DnsServerType::EasyDns => "EasyDns", + DnsServerType::EdgeDns => "EdgeDns", + DnsServerType::Exoscale => "Exoscale", + DnsServerType::FreeMyIp => "FreeMyIp", + DnsServerType::GandiV5 => "GandiV5", + DnsServerType::Gcore => "Gcore", + DnsServerType::Glesys => "Glesys", + DnsServerType::Godaddy => "Godaddy", + DnsServerType::Hetzner => "Hetzner", + DnsServerType::HostingDe => "HostingDe", + DnsServerType::Hostinger => "Hostinger", + DnsServerType::HuaweiCloud => "HuaweiCloud", + DnsServerType::Hurricane => "Hurricane", + DnsServerType::IbmCloud => "IbmCloud", + DnsServerType::Infoblox => "Infoblox", + DnsServerType::Infomaniak => "Infomaniak", + DnsServerType::Inwx => "Inwx", + DnsServerType::Ionos => "Ionos", + DnsServerType::Ipv64 => "Ipv64", + DnsServerType::Joker => "Joker", + DnsServerType::Lightsail => "Lightsail", + DnsServerType::Linode => "Linode", + DnsServerType::LuaDns => "LuaDns", + DnsServerType::MythicBeasts => "MythicBeasts", + DnsServerType::Namecheap => "Namecheap", + DnsServerType::NameDotCom => "NameDotCom", + DnsServerType::NameSilo => "NameSilo", + DnsServerType::Netcup => "Netcup", + DnsServerType::Netlify => "Netlify", + DnsServerType::Nifcloud => "Nifcloud", + DnsServerType::Ns1 => "Ns1", + DnsServerType::OracleCloud => "OracleCloud", + DnsServerType::Plesk => "Plesk", + DnsServerType::Safedns => "Safedns", + DnsServerType::Scaleway => "Scaleway", + DnsServerType::TencentCloud => "TencentCloud", + DnsServerType::Transip => "Transip", + DnsServerType::UltraDns => "UltraDns", + DnsServerType::Vercel => "Vercel", + DnsServerType::Volcengine => "Volcengine", + DnsServerType::Vultr => "Vultr", + DnsServerType::WebSupport => "WebSupport", + DnsServerType::YandexCloud => "YandexCloud", } } @@ -2900,7 +3247,7 @@ impl EnumImpl for DnsServerType { fn from_id(id: u16) -> Option { match id { 0 => Some(DnsServerType::Tsig), - 1 => Some(DnsServerType::Sig0), + 1 => Some(DnsServerType::Deprecated1), 2 => Some(DnsServerType::Cloudflare), 3 => Some(DnsServerType::DigitalOcean), 4 => Some(DnsServerType::DeSEC), @@ -2911,11 +3258,69 @@ impl EnumImpl for DnsServerType { 9 => Some(DnsServerType::Spaceship), 10 => Some(DnsServerType::Route53), 11 => Some(DnsServerType::GoogleCloudDns), + 12 => Some(DnsServerType::Alidns), + 13 => Some(DnsServerType::ArvanCloud), + 14 => Some(DnsServerType::Autodns), + 15 => Some(DnsServerType::AzureDns), + 16 => Some(DnsServerType::BaiduCloud), + 17 => Some(DnsServerType::BluecatV2), + 18 => Some(DnsServerType::ClouDns), + 19 => Some(DnsServerType::Constellix), + 20 => Some(DnsServerType::Cpanel), + 21 => Some(DnsServerType::Ddnss), + 22 => Some(DnsServerType::DnsMadeEasy), + 23 => Some(DnsServerType::Domeneshop), + 24 => Some(DnsServerType::Dreamhost), + 25 => Some(DnsServerType::DuckDns), + 26 => Some(DnsServerType::Dynu), + 27 => Some(DnsServerType::EasyDns), + 28 => Some(DnsServerType::EdgeDns), + 29 => Some(DnsServerType::Exoscale), + 30 => Some(DnsServerType::FreeMyIp), + 31 => Some(DnsServerType::GandiV5), + 32 => Some(DnsServerType::Gcore), + 33 => Some(DnsServerType::Glesys), + 34 => Some(DnsServerType::Godaddy), + 35 => Some(DnsServerType::Hetzner), + 36 => Some(DnsServerType::HostingDe), + 37 => Some(DnsServerType::Hostinger), + 38 => Some(DnsServerType::HuaweiCloud), + 39 => Some(DnsServerType::Hurricane), + 40 => Some(DnsServerType::IbmCloud), + 41 => Some(DnsServerType::Infoblox), + 42 => Some(DnsServerType::Infomaniak), + 43 => Some(DnsServerType::Inwx), + 44 => Some(DnsServerType::Ionos), + 45 => Some(DnsServerType::Ipv64), + 46 => Some(DnsServerType::Joker), + 47 => Some(DnsServerType::Lightsail), + 48 => Some(DnsServerType::Linode), + 49 => Some(DnsServerType::LuaDns), + 50 => Some(DnsServerType::MythicBeasts), + 51 => Some(DnsServerType::Namecheap), + 52 => Some(DnsServerType::NameDotCom), + 53 => Some(DnsServerType::NameSilo), + 54 => Some(DnsServerType::Netcup), + 55 => Some(DnsServerType::Netlify), + 56 => Some(DnsServerType::Nifcloud), + 57 => Some(DnsServerType::Ns1), + 58 => Some(DnsServerType::OracleCloud), + 59 => Some(DnsServerType::Plesk), + 60 => Some(DnsServerType::Safedns), + 61 => Some(DnsServerType::Scaleway), + 62 => Some(DnsServerType::TencentCloud), + 63 => Some(DnsServerType::Transip), + 64 => Some(DnsServerType::UltraDns), + 65 => Some(DnsServerType::Vercel), + 66 => Some(DnsServerType::Volcengine), + 67 => Some(DnsServerType::Vultr), + 68 => Some(DnsServerType::WebSupport), + 69 => Some(DnsServerType::YandexCloud), _ => None, } } - const COUNT: usize = 12; + const COUNT: usize = 70; } impl serde::Serialize for DnsServerType { @@ -3831,6 +4236,56 @@ impl<'de> serde::Deserialize<'de> for IpProtocol { } } +impl EnumImpl for JokerAuthType { + fn parse(value: &str) -> Option { + hashify::tiny_map! { + value.as_bytes(), + b"ApiKey" => JokerAuthType::ApiKey, + b"UsernamePassword" => JokerAuthType::UsernamePassword, + } + } + + fn as_str(&self) -> &'static str { + match self { + JokerAuthType::ApiKey => "ApiKey", + JokerAuthType::UsernamePassword => "UsernamePassword", + } + } + + fn to_id(&self) -> u16 { + *self as u16 + } + + fn from_id(id: u16) -> Option { + match id { + 0 => Some(JokerAuthType::ApiKey), + 1 => Some(JokerAuthType::UsernamePassword), + _ => None, + } + } + + const COUNT: usize = 2; +} + +impl serde::Serialize for JokerAuthType { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de> serde::Deserialize<'de> for JokerAuthType { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = Cow::::deserialize(deserializer)?; + Self::parse(&s).ok_or_else(|| serde::de::Error::unknown_variant(&s, &[])) + } +} + impl EnumImpl for JwtSignatureAlgorithm { fn parse(value: &str) -> Option { hashify::tiny_map! { diff --git a/crates/registry/src/schema/properties.rs b/crates/registry/src/schema/properties.rs index 9f2ac709..19abd781 100644 --- a/crates/registry/src/schema/properties.rs +++ b/crates/registry/src/schema/properties.rs @@ -259,6 +259,7 @@ pub enum Property { AbuseBanRate = 677, AccessKey = 118, AccessKeyId = 327, + AccessToken = 890, AccessTokenExpiry = 619, AccessTokens = 132, AccountDomainId = 810, @@ -266,6 +267,7 @@ pub enum Property { AccountIdentifier = 315, AccountKey = 15, AccountName = 809, + AccountSwitchKey = 891, AccountType = 811, AccountUri = 16, Accounts = 151, @@ -305,6 +307,7 @@ pub enum Property { AnonymousClientRegistration = 614, Ansi = 858, ApiKey = 325, + ApiUser = 892, ApplicationKey = 321, ApplicationSecret = 322, ArcResult = 292, @@ -326,11 +329,13 @@ pub enum Property { AttrSecret = 475, AttrSecretChanged = 476, Auid = 215, + Auth = 897, AuthBanPeriod = 680, AuthBanRate = 679, AuthCodeExpiry = 616, AuthCodeMaxAttempts = 613, AuthFailure = 81, + AuthId = 886, AuthSecret = 501, AuthToken = 314, AuthUsername = 502, @@ -339,6 +344,7 @@ pub enum Property { AutoAddInvitations = 171, AutoUpdateFrequency = 53, BaseDn = 463, + BaseUrl = 882, BearerToken = 403, Beta = 389, Bind = 589, @@ -371,17 +377,22 @@ pub enum Property { ClaimUsername = 609, Cleartext = 693, ClientId = 604, + ClientIp = 898, + ClientSecret = 878, + ClientToken = 889, ClusterFile = 382, ColumnClass = 781, ColumnDescription = 782, ColumnEmail = 779, ColumnSecret = 780, Comment = 240, + CompartmentOcid = 905, CompressionAlgorithm = 359, Concurrency = 304, Condition = 34, Confidence = 760, Config = 873, + ConfigName = 883, ConnectTimeout = 505, Connection = 539, ConsumerKey = 323, @@ -392,6 +403,7 @@ pub enum Property { Content = 65, ContentTypes = 758, Contents = 708, + Context = 877, Count = 258, Create = 367, CreatedAt = 46, @@ -402,6 +414,7 @@ pub enum Property { CustomEndpoint = 662, CustomRegion = 663, CustomRule = 787, + CustomerNumber = 899, Dane = 569, DataCleanupSchedule = 199, DataStore = 125, @@ -479,6 +492,7 @@ pub enum Property { DnsServerId = 300, DnsTlsa = 140, DnsTxt = 141, + DnsView = 894, DnsZoneFile = 345, DocumentId = 804, DocumentType = 814, @@ -528,6 +542,7 @@ pub enum Property { EnvRcptTo = 744, EnvelopeFrom = 264, EnvelopeTo = 263, + Environment = 881, ErrorCommand = 210, ErrorMessage = 209, ErrorType = 208, @@ -585,9 +600,11 @@ pub enum Property { FilterLogin = 467, FilterMailbox = 468, FilterMemberOf = 469, + Fingerprint = 902, Flags = 638, FlagsAction = 537, FlagsProtocol = 538, + FolderId = 909, ForDomain = 485, Format = 415, From = 62, @@ -682,6 +699,7 @@ pub enum Property { LearnSpamFromTraps = 729, Level = 373, LicenseKey = 370, + Line = 875, ListenerIds = 183, Listeners = 188, LivePropertyMaxSize = 869, @@ -840,6 +858,7 @@ pub enum Property { ParseLimitContact = 433, ParseLimitEmail = 434, ParseLimitEvent = 432, + Password = 876, PasswordDefaultExpiry = 113, PasswordHashAlgorithm = 109, PasswordMaxLength = 111, @@ -878,6 +897,8 @@ pub enum Property { PreserveIntermediates = 306, Priority = 483, PrivateKey = 177, + PrivateKeyPassword = 904, + PrivateKeyPem = 903, PrivateZone = 319, PrivateZoneOnly = 332, Profile = 661, @@ -948,6 +969,7 @@ pub enum Property { RequireScopes = 608, RequireTls = 525, ReservoirCapacity = 733, + ResourceGroup = 880, ResourceUrl = 51, ResponseCode = 212, ResponseEnhanced = 213, @@ -972,6 +994,7 @@ pub enum Property { RotateAfter = 227, Route = 540, Rua = 236, + Sandbox = 896, SasToken = 119, SaslMechanisms = 549, ScanBanPaths = 683, @@ -979,6 +1002,7 @@ pub enum Property { ScanBanRate = 684, Schedule = 541, Scheduling = 143, + Scheme = 908, Scope = 281, Score = 745, ScoreDiscard = 771, @@ -989,6 +1013,7 @@ pub enum Property { Secret = 3, SecretAccessKey = 328, SecretApiKey = 326, + SecretId = 906, SecretKey = 659, SecurityToken = 660, Selector = 222, @@ -1003,11 +1028,13 @@ pub enum Property { SessionToken = 329, SetMaxObjects = 440, ShardIndex = 830, + SharedSecret = 895, Sig0Algorithm = 336, SignatureAlgorithm = 623, SignatureKey = 624, SignerName = 335, Size = 64, + SkipDeploy = 885, SkipFirst = 423, SmtpGreeting = 552, SnippetMaxResults = 441, @@ -1041,9 +1068,11 @@ pub enum Property { Stores = 694, Strategy = 816, SubAddressing = 347, + SubAuthId = 887, Subject = 41, SubjectAlternativeNames = 178, Subscribe = 368, + SubscriptionId = 879, Sum = 494, Summary = 808, SupportedLanguages = 666, @@ -1052,9 +1081,11 @@ pub enum Property { TaskTypes = 189, Tasks = 187, TcpOnError = 307, + TeamId = 907, TempFailOnError = 528, Temperature = 27, Template = 167, + TenancyOcid = 900, TenantId = 831, Tenants = 153, Text = 2, @@ -1086,6 +1117,7 @@ pub enum Property { TlsImplicit = 602, TlsTimeout = 573, To = 42, + Token = 888, TotalDeadline = 817, TotalFailedSessions = 850, TotalSuccessfulSessions = 849, @@ -1114,6 +1146,7 @@ pub enum Property { UsedDiskQuota = 395, UserAgent = 79, UserCodeExpiry = 620, + UserOcid = 901, Username = 131, UsernameDomain = 610, ValidateDomain = 413, @@ -1121,8 +1154,10 @@ pub enum Property { VariableName = 675, VerifyAfterWrite = 874, Version = 80, + ViewName = 884, Vrfy = 526, WaitOnFail = 548, + WapiVersion = 893, WebsocketHeartbeat = 455, WebsocketThrottle = 456, WebsocketTimeout = 457, diff --git a/crates/registry/src/schema/properties_impl.rs b/crates/registry/src/schema/properties_impl.rs index a114fc73..fbde05b3 100644 --- a/crates/registry/src/schema/properties_impl.rs +++ b/crates/registry/src/schema/properties_impl.rs @@ -412,6 +412,7 @@ impl EnumImpl for Property { b"abuseBanRate" => Property::AbuseBanRate, b"accessKey" => Property::AccessKey, b"accessKeyId" => Property::AccessKeyId, + b"accessToken" => Property::AccessToken, b"accessTokenExpiry" => Property::AccessTokenExpiry, b"accessTokens" => Property::AccessTokens, b"accountDomainId" => Property::AccountDomainId, @@ -419,6 +420,7 @@ impl EnumImpl for Property { b"accountIdentifier" => Property::AccountIdentifier, b"accountKey" => Property::AccountKey, b"accountName" => Property::AccountName, + b"accountSwitchKey" => Property::AccountSwitchKey, b"accountType" => Property::AccountType, b"accountUri" => Property::AccountUri, b"accounts" => Property::Accounts, @@ -458,6 +460,7 @@ impl EnumImpl for Property { b"anonymousClientRegistration" => Property::AnonymousClientRegistration, b"ansi" => Property::Ansi, b"apiKey" => Property::ApiKey, + b"apiUser" => Property::ApiUser, b"applicationKey" => Property::ApplicationKey, b"applicationSecret" => Property::ApplicationSecret, b"arcResult" => Property::ArcResult, @@ -479,11 +482,13 @@ impl EnumImpl for Property { b"attrSecret" => Property::AttrSecret, b"attrSecretChanged" => Property::AttrSecretChanged, b"auid" => Property::Auid, + b"auth" => Property::Auth, b"authBanPeriod" => Property::AuthBanPeriod, b"authBanRate" => Property::AuthBanRate, b"authCodeExpiry" => Property::AuthCodeExpiry, b"authCodeMaxAttempts" => Property::AuthCodeMaxAttempts, b"authFailure" => Property::AuthFailure, + b"authId" => Property::AuthId, b"authSecret" => Property::AuthSecret, b"authToken" => Property::AuthToken, b"authUsername" => Property::AuthUsername, @@ -492,6 +497,7 @@ impl EnumImpl for Property { b"autoAddInvitations" => Property::AutoAddInvitations, b"autoUpdateFrequency" => Property::AutoUpdateFrequency, b"baseDn" => Property::BaseDn, + b"baseUrl" => Property::BaseUrl, b"bearerToken" => Property::BearerToken, b"beta" => Property::Beta, b"bind" => Property::Bind, @@ -524,17 +530,22 @@ impl EnumImpl for Property { b"claimUsername" => Property::ClaimUsername, b"cleartext" => Property::Cleartext, b"clientId" => Property::ClientId, + b"clientIp" => Property::ClientIp, + b"clientSecret" => Property::ClientSecret, + b"clientToken" => Property::ClientToken, b"clusterFile" => Property::ClusterFile, b"columnClass" => Property::ColumnClass, b"columnDescription" => Property::ColumnDescription, b"columnEmail" => Property::ColumnEmail, b"columnSecret" => Property::ColumnSecret, b"comment" => Property::Comment, + b"compartmentOcid" => Property::CompartmentOcid, b"compressionAlgorithm" => Property::CompressionAlgorithm, b"concurrency" => Property::Concurrency, b"condition" => Property::Condition, b"confidence" => Property::Confidence, b"config" => Property::Config, + b"configName" => Property::ConfigName, b"connectTimeout" => Property::ConnectTimeout, b"connection" => Property::Connection, b"consumerKey" => Property::ConsumerKey, @@ -545,6 +556,7 @@ impl EnumImpl for Property { b"content" => Property::Content, b"contentTypes" => Property::ContentTypes, b"contents" => Property::Contents, + b"context" => Property::Context, b"count" => Property::Count, b"create" => Property::Create, b"createdAt" => Property::CreatedAt, @@ -555,6 +567,7 @@ impl EnumImpl for Property { b"customEndpoint" => Property::CustomEndpoint, b"customRegion" => Property::CustomRegion, b"customRule" => Property::CustomRule, + b"customerNumber" => Property::CustomerNumber, b"dane" => Property::Dane, b"dataCleanupSchedule" => Property::DataCleanupSchedule, b"dataStore" => Property::DataStore, @@ -632,6 +645,7 @@ impl EnumImpl for Property { b"dnsServerId" => Property::DnsServerId, b"dnsTlsa" => Property::DnsTlsa, b"dnsTxt" => Property::DnsTxt, + b"dnsView" => Property::DnsView, b"dnsZoneFile" => Property::DnsZoneFile, b"documentId" => Property::DocumentId, b"documentType" => Property::DocumentType, @@ -681,6 +695,7 @@ impl EnumImpl for Property { b"envRcptTo" => Property::EnvRcptTo, b"envelopeFrom" => Property::EnvelopeFrom, b"envelopeTo" => Property::EnvelopeTo, + b"environment" => Property::Environment, b"errorCommand" => Property::ErrorCommand, b"errorMessage" => Property::ErrorMessage, b"errorType" => Property::ErrorType, @@ -738,9 +753,11 @@ impl EnumImpl for Property { b"filterLogin" => Property::FilterLogin, b"filterMailbox" => Property::FilterMailbox, b"filterMemberOf" => Property::FilterMemberOf, + b"fingerprint" => Property::Fingerprint, b"flags" => Property::Flags, b"flagsAction" => Property::FlagsAction, b"flagsProtocol" => Property::FlagsProtocol, + b"folderId" => Property::FolderId, b"forDomain" => Property::ForDomain, b"format" => Property::Format, b"from" => Property::From, @@ -835,6 +852,7 @@ impl EnumImpl for Property { b"learnSpamFromTraps" => Property::LearnSpamFromTraps, b"level" => Property::Level, b"licenseKey" => Property::LicenseKey, + b"line" => Property::Line, b"listenerIds" => Property::ListenerIds, b"listeners" => Property::Listeners, b"livePropertyMaxSize" => Property::LivePropertyMaxSize, @@ -993,6 +1011,7 @@ impl EnumImpl for Property { b"parseLimitContact" => Property::ParseLimitContact, b"parseLimitEmail" => Property::ParseLimitEmail, b"parseLimitEvent" => Property::ParseLimitEvent, + b"password" => Property::Password, b"passwordDefaultExpiry" => Property::PasswordDefaultExpiry, b"passwordHashAlgorithm" => Property::PasswordHashAlgorithm, b"passwordMaxLength" => Property::PasswordMaxLength, @@ -1031,6 +1050,8 @@ impl EnumImpl for Property { b"preserveIntermediates" => Property::PreserveIntermediates, b"priority" => Property::Priority, b"privateKey" => Property::PrivateKey, + b"privateKeyPassword" => Property::PrivateKeyPassword, + b"privateKeyPem" => Property::PrivateKeyPem, b"privateZone" => Property::PrivateZone, b"privateZoneOnly" => Property::PrivateZoneOnly, b"profile" => Property::Profile, @@ -1101,6 +1122,7 @@ impl EnumImpl for Property { b"requireScopes" => Property::RequireScopes, b"requireTls" => Property::RequireTls, b"reservoirCapacity" => Property::ReservoirCapacity, + b"resourceGroup" => Property::ResourceGroup, b"resourceUrl" => Property::ResourceUrl, b"responseCode" => Property::ResponseCode, b"responseEnhanced" => Property::ResponseEnhanced, @@ -1125,6 +1147,7 @@ impl EnumImpl for Property { b"rotateAfter" => Property::RotateAfter, b"route" => Property::Route, b"rua" => Property::Rua, + b"sandbox" => Property::Sandbox, b"sasToken" => Property::SasToken, b"saslMechanisms" => Property::SaslMechanisms, b"scanBanPaths" => Property::ScanBanPaths, @@ -1132,6 +1155,7 @@ impl EnumImpl for Property { b"scanBanRate" => Property::ScanBanRate, b"schedule" => Property::Schedule, b"scheduling" => Property::Scheduling, + b"scheme" => Property::Scheme, b"scope" => Property::Scope, b"score" => Property::Score, b"scoreDiscard" => Property::ScoreDiscard, @@ -1142,6 +1166,7 @@ impl EnumImpl for Property { b"secret" => Property::Secret, b"secretAccessKey" => Property::SecretAccessKey, b"secretApiKey" => Property::SecretApiKey, + b"secretId" => Property::SecretId, b"secretKey" => Property::SecretKey, b"securityToken" => Property::SecurityToken, b"selector" => Property::Selector, @@ -1156,11 +1181,13 @@ impl EnumImpl for Property { b"sessionToken" => Property::SessionToken, b"setMaxObjects" => Property::SetMaxObjects, b"shardIndex" => Property::ShardIndex, + b"sharedSecret" => Property::SharedSecret, b"sig0Algorithm" => Property::Sig0Algorithm, b"signatureAlgorithm" => Property::SignatureAlgorithm, b"signatureKey" => Property::SignatureKey, b"signerName" => Property::SignerName, b"size" => Property::Size, + b"skipDeploy" => Property::SkipDeploy, b"skipFirst" => Property::SkipFirst, b"smtpGreeting" => Property::SmtpGreeting, b"snippetMaxResults" => Property::SnippetMaxResults, @@ -1194,9 +1221,11 @@ impl EnumImpl for Property { b"stores" => Property::Stores, b"strategy" => Property::Strategy, b"subAddressing" => Property::SubAddressing, + b"subAuthId" => Property::SubAuthId, b"subject" => Property::Subject, b"subjectAlternativeNames" => Property::SubjectAlternativeNames, b"subscribe" => Property::Subscribe, + b"subscriptionId" => Property::SubscriptionId, b"sum" => Property::Sum, b"summary" => Property::Summary, b"supportedLanguages" => Property::SupportedLanguages, @@ -1205,9 +1234,11 @@ impl EnumImpl for Property { b"taskTypes" => Property::TaskTypes, b"tasks" => Property::Tasks, b"tcpOnError" => Property::TcpOnError, + b"teamId" => Property::TeamId, b"tempFailOnError" => Property::TempFailOnError, b"temperature" => Property::Temperature, b"template" => Property::Template, + b"tenancyOcid" => Property::TenancyOcid, b"tenantId" => Property::TenantId, b"tenants" => Property::Tenants, b"text" => Property::Text, @@ -1239,6 +1270,7 @@ impl EnumImpl for Property { b"tlsImplicit" => Property::TlsImplicit, b"tlsTimeout" => Property::TlsTimeout, b"to" => Property::To, + b"token" => Property::Token, b"totalDeadline" => Property::TotalDeadline, b"totalFailedSessions" => Property::TotalFailedSessions, b"totalSuccessfulSessions" => Property::TotalSuccessfulSessions, @@ -1267,6 +1299,7 @@ impl EnumImpl for Property { b"usedDiskQuota" => Property::UsedDiskQuota, b"userAgent" => Property::UserAgent, b"userCodeExpiry" => Property::UserCodeExpiry, + b"userOcid" => Property::UserOcid, b"username" => Property::Username, b"usernameDomain" => Property::UsernameDomain, b"validateDomain" => Property::ValidateDomain, @@ -1274,8 +1307,10 @@ impl EnumImpl for Property { b"variableName" => Property::VariableName, b"verifyAfterWrite" => Property::VerifyAfterWrite, b"version" => Property::Version, + b"viewName" => Property::ViewName, b"vrfy" => Property::Vrfy, b"waitOnFail" => Property::WaitOnFail, + b"wapiVersion" => Property::WapiVersion, b"websocketHeartbeat" => Property::WebsocketHeartbeat, b"websocketThrottle" => Property::WebsocketThrottle, b"websocketTimeout" => Property::WebsocketTimeout, @@ -1292,6 +1327,7 @@ impl EnumImpl for Property { Property::AbuseBanRate => "abuseBanRate", Property::AccessKey => "accessKey", Property::AccessKeyId => "accessKeyId", + Property::AccessToken => "accessToken", Property::AccessTokenExpiry => "accessTokenExpiry", Property::AccessTokens => "accessTokens", Property::AccountDomainId => "accountDomainId", @@ -1299,6 +1335,7 @@ impl EnumImpl for Property { Property::AccountIdentifier => "accountIdentifier", Property::AccountKey => "accountKey", Property::AccountName => "accountName", + Property::AccountSwitchKey => "accountSwitchKey", Property::AccountType => "accountType", Property::AccountUri => "accountUri", Property::Accounts => "accounts", @@ -1338,6 +1375,7 @@ impl EnumImpl for Property { Property::AnonymousClientRegistration => "anonymousClientRegistration", Property::Ansi => "ansi", Property::ApiKey => "apiKey", + Property::ApiUser => "apiUser", Property::ApplicationKey => "applicationKey", Property::ApplicationSecret => "applicationSecret", Property::ArcResult => "arcResult", @@ -1359,11 +1397,13 @@ impl EnumImpl for Property { Property::AttrSecret => "attrSecret", Property::AttrSecretChanged => "attrSecretChanged", Property::Auid => "auid", + Property::Auth => "auth", Property::AuthBanPeriod => "authBanPeriod", Property::AuthBanRate => "authBanRate", Property::AuthCodeExpiry => "authCodeExpiry", Property::AuthCodeMaxAttempts => "authCodeMaxAttempts", Property::AuthFailure => "authFailure", + Property::AuthId => "authId", Property::AuthSecret => "authSecret", Property::AuthToken => "authToken", Property::AuthUsername => "authUsername", @@ -1372,6 +1412,7 @@ impl EnumImpl for Property { Property::AutoAddInvitations => "autoAddInvitations", Property::AutoUpdateFrequency => "autoUpdateFrequency", Property::BaseDn => "baseDn", + Property::BaseUrl => "baseUrl", Property::BearerToken => "bearerToken", Property::Beta => "beta", Property::Bind => "bind", @@ -1404,17 +1445,22 @@ impl EnumImpl for Property { Property::ClaimUsername => "claimUsername", Property::Cleartext => "cleartext", Property::ClientId => "clientId", + Property::ClientIp => "clientIp", + Property::ClientSecret => "clientSecret", + Property::ClientToken => "clientToken", Property::ClusterFile => "clusterFile", Property::ColumnClass => "columnClass", Property::ColumnDescription => "columnDescription", Property::ColumnEmail => "columnEmail", Property::ColumnSecret => "columnSecret", Property::Comment => "comment", + Property::CompartmentOcid => "compartmentOcid", Property::CompressionAlgorithm => "compressionAlgorithm", Property::Concurrency => "concurrency", Property::Condition => "condition", Property::Confidence => "confidence", Property::Config => "config", + Property::ConfigName => "configName", Property::ConnectTimeout => "connectTimeout", Property::Connection => "connection", Property::ConsumerKey => "consumerKey", @@ -1425,6 +1471,7 @@ impl EnumImpl for Property { Property::Content => "content", Property::ContentTypes => "contentTypes", Property::Contents => "contents", + Property::Context => "context", Property::Count => "count", Property::Create => "create", Property::CreatedAt => "createdAt", @@ -1435,6 +1482,7 @@ impl EnumImpl for Property { Property::CustomEndpoint => "customEndpoint", Property::CustomRegion => "customRegion", Property::CustomRule => "customRule", + Property::CustomerNumber => "customerNumber", Property::Dane => "dane", Property::DataCleanupSchedule => "dataCleanupSchedule", Property::DataStore => "dataStore", @@ -1512,6 +1560,7 @@ impl EnumImpl for Property { Property::DnsServerId => "dnsServerId", Property::DnsTlsa => "dnsTlsa", Property::DnsTxt => "dnsTxt", + Property::DnsView => "dnsView", Property::DnsZoneFile => "dnsZoneFile", Property::DocumentId => "documentId", Property::DocumentType => "documentType", @@ -1561,6 +1610,7 @@ impl EnumImpl for Property { Property::EnvRcptTo => "envRcptTo", Property::EnvelopeFrom => "envelopeFrom", Property::EnvelopeTo => "envelopeTo", + Property::Environment => "environment", Property::ErrorCommand => "errorCommand", Property::ErrorMessage => "errorMessage", Property::ErrorType => "errorType", @@ -1618,9 +1668,11 @@ impl EnumImpl for Property { Property::FilterLogin => "filterLogin", Property::FilterMailbox => "filterMailbox", Property::FilterMemberOf => "filterMemberOf", + Property::Fingerprint => "fingerprint", Property::Flags => "flags", Property::FlagsAction => "flagsAction", Property::FlagsProtocol => "flagsProtocol", + Property::FolderId => "folderId", Property::ForDomain => "forDomain", Property::Format => "format", Property::From => "from", @@ -1715,6 +1767,7 @@ impl EnumImpl for Property { Property::LearnSpamFromTraps => "learnSpamFromTraps", Property::Level => "level", Property::LicenseKey => "licenseKey", + Property::Line => "line", Property::ListenerIds => "listenerIds", Property::Listeners => "listeners", Property::LivePropertyMaxSize => "livePropertyMaxSize", @@ -1873,6 +1926,7 @@ impl EnumImpl for Property { Property::ParseLimitContact => "parseLimitContact", Property::ParseLimitEmail => "parseLimitEmail", Property::ParseLimitEvent => "parseLimitEvent", + Property::Password => "password", Property::PasswordDefaultExpiry => "passwordDefaultExpiry", Property::PasswordHashAlgorithm => "passwordHashAlgorithm", Property::PasswordMaxLength => "passwordMaxLength", @@ -1911,6 +1965,8 @@ impl EnumImpl for Property { Property::PreserveIntermediates => "preserveIntermediates", Property::Priority => "priority", Property::PrivateKey => "privateKey", + Property::PrivateKeyPassword => "privateKeyPassword", + Property::PrivateKeyPem => "privateKeyPem", Property::PrivateZone => "privateZone", Property::PrivateZoneOnly => "privateZoneOnly", Property::Profile => "profile", @@ -1981,6 +2037,7 @@ impl EnumImpl for Property { Property::RequireScopes => "requireScopes", Property::RequireTls => "requireTls", Property::ReservoirCapacity => "reservoirCapacity", + Property::ResourceGroup => "resourceGroup", Property::ResourceUrl => "resourceUrl", Property::ResponseCode => "responseCode", Property::ResponseEnhanced => "responseEnhanced", @@ -2005,6 +2062,7 @@ impl EnumImpl for Property { Property::RotateAfter => "rotateAfter", Property::Route => "route", Property::Rua => "rua", + Property::Sandbox => "sandbox", Property::SasToken => "sasToken", Property::SaslMechanisms => "saslMechanisms", Property::ScanBanPaths => "scanBanPaths", @@ -2012,6 +2070,7 @@ impl EnumImpl for Property { Property::ScanBanRate => "scanBanRate", Property::Schedule => "schedule", Property::Scheduling => "scheduling", + Property::Scheme => "scheme", Property::Scope => "scope", Property::Score => "score", Property::ScoreDiscard => "scoreDiscard", @@ -2022,6 +2081,7 @@ impl EnumImpl for Property { Property::Secret => "secret", Property::SecretAccessKey => "secretAccessKey", Property::SecretApiKey => "secretApiKey", + Property::SecretId => "secretId", Property::SecretKey => "secretKey", Property::SecurityToken => "securityToken", Property::Selector => "selector", @@ -2036,11 +2096,13 @@ impl EnumImpl for Property { Property::SessionToken => "sessionToken", Property::SetMaxObjects => "setMaxObjects", Property::ShardIndex => "shardIndex", + Property::SharedSecret => "sharedSecret", Property::Sig0Algorithm => "sig0Algorithm", Property::SignatureAlgorithm => "signatureAlgorithm", Property::SignatureKey => "signatureKey", Property::SignerName => "signerName", Property::Size => "size", + Property::SkipDeploy => "skipDeploy", Property::SkipFirst => "skipFirst", Property::SmtpGreeting => "smtpGreeting", Property::SnippetMaxResults => "snippetMaxResults", @@ -2074,9 +2136,11 @@ impl EnumImpl for Property { Property::Stores => "stores", Property::Strategy => "strategy", Property::SubAddressing => "subAddressing", + Property::SubAuthId => "subAuthId", Property::Subject => "subject", Property::SubjectAlternativeNames => "subjectAlternativeNames", Property::Subscribe => "subscribe", + Property::SubscriptionId => "subscriptionId", Property::Sum => "sum", Property::Summary => "summary", Property::SupportedLanguages => "supportedLanguages", @@ -2085,9 +2149,11 @@ impl EnumImpl for Property { Property::TaskTypes => "taskTypes", Property::Tasks => "tasks", Property::TcpOnError => "tcpOnError", + Property::TeamId => "teamId", Property::TempFailOnError => "tempFailOnError", Property::Temperature => "temperature", Property::Template => "template", + Property::TenancyOcid => "tenancyOcid", Property::TenantId => "tenantId", Property::Tenants => "tenants", Property::Text => "text", @@ -2119,6 +2185,7 @@ impl EnumImpl for Property { Property::TlsImplicit => "tlsImplicit", Property::TlsTimeout => "tlsTimeout", Property::To => "to", + Property::Token => "token", Property::TotalDeadline => "totalDeadline", Property::TotalFailedSessions => "totalFailedSessions", Property::TotalSuccessfulSessions => "totalSuccessfulSessions", @@ -2147,6 +2214,7 @@ impl EnumImpl for Property { Property::UsedDiskQuota => "usedDiskQuota", Property::UserAgent => "userAgent", Property::UserCodeExpiry => "userCodeExpiry", + Property::UserOcid => "userOcid", Property::Username => "username", Property::UsernameDomain => "usernameDomain", Property::ValidateDomain => "validateDomain", @@ -2154,8 +2222,10 @@ impl EnumImpl for Property { Property::VariableName => "variableName", Property::VerifyAfterWrite => "verifyAfterWrite", Property::Version => "version", + Property::ViewName => "viewName", Property::Vrfy => "vrfy", Property::WaitOnFail => "waitOnFail", + Property::WapiVersion => "wapiVersion", Property::WebsocketHeartbeat => "websocketHeartbeat", Property::WebsocketThrottle => "websocketThrottle", Property::WebsocketTimeout => "websocketTimeout", @@ -2176,6 +2246,7 @@ impl EnumImpl for Property { 677 => Some(Property::AbuseBanRate), 118 => Some(Property::AccessKey), 327 => Some(Property::AccessKeyId), + 890 => Some(Property::AccessToken), 619 => Some(Property::AccessTokenExpiry), 132 => Some(Property::AccessTokens), 810 => Some(Property::AccountDomainId), @@ -2183,6 +2254,7 @@ impl EnumImpl for Property { 315 => Some(Property::AccountIdentifier), 15 => Some(Property::AccountKey), 809 => Some(Property::AccountName), + 891 => Some(Property::AccountSwitchKey), 811 => Some(Property::AccountType), 16 => Some(Property::AccountUri), 151 => Some(Property::Accounts), @@ -2222,6 +2294,7 @@ impl EnumImpl for Property { 614 => Some(Property::AnonymousClientRegistration), 858 => Some(Property::Ansi), 325 => Some(Property::ApiKey), + 892 => Some(Property::ApiUser), 321 => Some(Property::ApplicationKey), 322 => Some(Property::ApplicationSecret), 292 => Some(Property::ArcResult), @@ -2243,11 +2316,13 @@ impl EnumImpl for Property { 475 => Some(Property::AttrSecret), 476 => Some(Property::AttrSecretChanged), 215 => Some(Property::Auid), + 897 => Some(Property::Auth), 680 => Some(Property::AuthBanPeriod), 679 => Some(Property::AuthBanRate), 616 => Some(Property::AuthCodeExpiry), 613 => Some(Property::AuthCodeMaxAttempts), 81 => Some(Property::AuthFailure), + 886 => Some(Property::AuthId), 501 => Some(Property::AuthSecret), 314 => Some(Property::AuthToken), 502 => Some(Property::AuthUsername), @@ -2256,6 +2331,7 @@ impl EnumImpl for Property { 171 => Some(Property::AutoAddInvitations), 53 => Some(Property::AutoUpdateFrequency), 463 => Some(Property::BaseDn), + 882 => Some(Property::BaseUrl), 403 => Some(Property::BearerToken), 389 => Some(Property::Beta), 589 => Some(Property::Bind), @@ -2288,17 +2364,22 @@ impl EnumImpl for Property { 609 => Some(Property::ClaimUsername), 693 => Some(Property::Cleartext), 604 => Some(Property::ClientId), + 898 => Some(Property::ClientIp), + 878 => Some(Property::ClientSecret), + 889 => Some(Property::ClientToken), 382 => Some(Property::ClusterFile), 781 => Some(Property::ColumnClass), 782 => Some(Property::ColumnDescription), 779 => Some(Property::ColumnEmail), 780 => Some(Property::ColumnSecret), 240 => Some(Property::Comment), + 905 => Some(Property::CompartmentOcid), 359 => Some(Property::CompressionAlgorithm), 304 => Some(Property::Concurrency), 34 => Some(Property::Condition), 760 => Some(Property::Confidence), 873 => Some(Property::Config), + 883 => Some(Property::ConfigName), 505 => Some(Property::ConnectTimeout), 539 => Some(Property::Connection), 323 => Some(Property::ConsumerKey), @@ -2309,6 +2390,7 @@ impl EnumImpl for Property { 65 => Some(Property::Content), 758 => Some(Property::ContentTypes), 708 => Some(Property::Contents), + 877 => Some(Property::Context), 258 => Some(Property::Count), 367 => Some(Property::Create), 46 => Some(Property::CreatedAt), @@ -2319,6 +2401,7 @@ impl EnumImpl for Property { 662 => Some(Property::CustomEndpoint), 663 => Some(Property::CustomRegion), 787 => Some(Property::CustomRule), + 899 => Some(Property::CustomerNumber), 569 => Some(Property::Dane), 199 => Some(Property::DataCleanupSchedule), 125 => Some(Property::DataStore), @@ -2396,6 +2479,7 @@ impl EnumImpl for Property { 300 => Some(Property::DnsServerId), 140 => Some(Property::DnsTlsa), 141 => Some(Property::DnsTxt), + 894 => Some(Property::DnsView), 345 => Some(Property::DnsZoneFile), 804 => Some(Property::DocumentId), 814 => Some(Property::DocumentType), @@ -2445,6 +2529,7 @@ impl EnumImpl for Property { 744 => Some(Property::EnvRcptTo), 264 => Some(Property::EnvelopeFrom), 263 => Some(Property::EnvelopeTo), + 881 => Some(Property::Environment), 210 => Some(Property::ErrorCommand), 209 => Some(Property::ErrorMessage), 208 => Some(Property::ErrorType), @@ -2502,9 +2587,11 @@ impl EnumImpl for Property { 467 => Some(Property::FilterLogin), 468 => Some(Property::FilterMailbox), 469 => Some(Property::FilterMemberOf), + 902 => Some(Property::Fingerprint), 638 => Some(Property::Flags), 537 => Some(Property::FlagsAction), 538 => Some(Property::FlagsProtocol), + 909 => Some(Property::FolderId), 485 => Some(Property::ForDomain), 415 => Some(Property::Format), 62 => Some(Property::From), @@ -2599,6 +2686,7 @@ impl EnumImpl for Property { 729 => Some(Property::LearnSpamFromTraps), 373 => Some(Property::Level), 370 => Some(Property::LicenseKey), + 875 => Some(Property::Line), 183 => Some(Property::ListenerIds), 188 => Some(Property::Listeners), 869 => Some(Property::LivePropertyMaxSize), @@ -2757,6 +2845,7 @@ impl EnumImpl for Property { 433 => Some(Property::ParseLimitContact), 434 => Some(Property::ParseLimitEmail), 432 => Some(Property::ParseLimitEvent), + 876 => Some(Property::Password), 113 => Some(Property::PasswordDefaultExpiry), 109 => Some(Property::PasswordHashAlgorithm), 111 => Some(Property::PasswordMaxLength), @@ -2795,6 +2884,8 @@ impl EnumImpl for Property { 306 => Some(Property::PreserveIntermediates), 483 => Some(Property::Priority), 177 => Some(Property::PrivateKey), + 904 => Some(Property::PrivateKeyPassword), + 903 => Some(Property::PrivateKeyPem), 319 => Some(Property::PrivateZone), 332 => Some(Property::PrivateZoneOnly), 661 => Some(Property::Profile), @@ -2865,6 +2956,7 @@ impl EnumImpl for Property { 608 => Some(Property::RequireScopes), 525 => Some(Property::RequireTls), 733 => Some(Property::ReservoirCapacity), + 880 => Some(Property::ResourceGroup), 51 => Some(Property::ResourceUrl), 212 => Some(Property::ResponseCode), 213 => Some(Property::ResponseEnhanced), @@ -2889,6 +2981,7 @@ impl EnumImpl for Property { 227 => Some(Property::RotateAfter), 540 => Some(Property::Route), 236 => Some(Property::Rua), + 896 => Some(Property::Sandbox), 119 => Some(Property::SasToken), 549 => Some(Property::SaslMechanisms), 683 => Some(Property::ScanBanPaths), @@ -2896,6 +2989,7 @@ impl EnumImpl for Property { 684 => Some(Property::ScanBanRate), 541 => Some(Property::Schedule), 143 => Some(Property::Scheduling), + 908 => Some(Property::Scheme), 281 => Some(Property::Scope), 745 => Some(Property::Score), 771 => Some(Property::ScoreDiscard), @@ -2906,6 +3000,7 @@ impl EnumImpl for Property { 3 => Some(Property::Secret), 328 => Some(Property::SecretAccessKey), 326 => Some(Property::SecretApiKey), + 906 => Some(Property::SecretId), 659 => Some(Property::SecretKey), 660 => Some(Property::SecurityToken), 222 => Some(Property::Selector), @@ -2920,11 +3015,13 @@ impl EnumImpl for Property { 329 => Some(Property::SessionToken), 440 => Some(Property::SetMaxObjects), 830 => Some(Property::ShardIndex), + 895 => Some(Property::SharedSecret), 336 => Some(Property::Sig0Algorithm), 623 => Some(Property::SignatureAlgorithm), 624 => Some(Property::SignatureKey), 335 => Some(Property::SignerName), 64 => Some(Property::Size), + 885 => Some(Property::SkipDeploy), 423 => Some(Property::SkipFirst), 552 => Some(Property::SmtpGreeting), 441 => Some(Property::SnippetMaxResults), @@ -2958,9 +3055,11 @@ impl EnumImpl for Property { 694 => Some(Property::Stores), 816 => Some(Property::Strategy), 347 => Some(Property::SubAddressing), + 887 => Some(Property::SubAuthId), 41 => Some(Property::Subject), 178 => Some(Property::SubjectAlternativeNames), 368 => Some(Property::Subscribe), + 879 => Some(Property::SubscriptionId), 494 => Some(Property::Sum), 808 => Some(Property::Summary), 666 => Some(Property::SupportedLanguages), @@ -2969,9 +3068,11 @@ impl EnumImpl for Property { 189 => Some(Property::TaskTypes), 187 => Some(Property::Tasks), 307 => Some(Property::TcpOnError), + 907 => Some(Property::TeamId), 528 => Some(Property::TempFailOnError), 27 => Some(Property::Temperature), 167 => Some(Property::Template), + 900 => Some(Property::TenancyOcid), 831 => Some(Property::TenantId), 153 => Some(Property::Tenants), 2 => Some(Property::Text), @@ -3003,6 +3104,7 @@ impl EnumImpl for Property { 602 => Some(Property::TlsImplicit), 573 => Some(Property::TlsTimeout), 42 => Some(Property::To), + 888 => Some(Property::Token), 817 => Some(Property::TotalDeadline), 850 => Some(Property::TotalFailedSessions), 849 => Some(Property::TotalSuccessfulSessions), @@ -3031,6 +3133,7 @@ impl EnumImpl for Property { 395 => Some(Property::UsedDiskQuota), 79 => Some(Property::UserAgent), 620 => Some(Property::UserCodeExpiry), + 901 => Some(Property::UserOcid), 131 => Some(Property::Username), 610 => Some(Property::UsernameDomain), 413 => Some(Property::ValidateDomain), @@ -3038,8 +3141,10 @@ impl EnumImpl for Property { 675 => Some(Property::VariableName), 874 => Some(Property::VerifyAfterWrite), 80 => Some(Property::Version), + 884 => Some(Property::ViewName), 526 => Some(Property::Vrfy), 548 => Some(Property::WaitOnFail), + 893 => Some(Property::WapiVersion), 455 => Some(Property::WebsocketHeartbeat), 456 => Some(Property::WebsocketThrottle), 457 => Some(Property::WebsocketTimeout), @@ -3050,7 +3155,7 @@ impl EnumImpl for Property { } } - const COUNT: usize = 875; + const COUNT: usize = 910; } impl serde::Serialize for Property { @@ -4234,7 +4339,6 @@ impl ObjectInner { ObjectInner::DkimSignature(DkimSignature::Dkim1RsaSha256(obj)) => obj.member_tenant_id, ObjectInner::DmarcExternalReport(obj) => obj.member_tenant_id, ObjectInner::DnsServer(DnsServer::Tsig(obj)) => obj.member_tenant_id, - ObjectInner::DnsServer(DnsServer::Sig0(obj)) => obj.member_tenant_id, ObjectInner::DnsServer(DnsServer::Cloudflare(obj)) => obj.member_tenant_id, ObjectInner::DnsServer(DnsServer::DigitalOcean(obj)) => obj.member_tenant_id, ObjectInner::DnsServer(DnsServer::DeSEC(obj)) => obj.member_tenant_id, @@ -4245,6 +4349,64 @@ impl ObjectInner { ObjectInner::DnsServer(DnsServer::Spaceship(obj)) => obj.member_tenant_id, ObjectInner::DnsServer(DnsServer::Route53(obj)) => obj.member_tenant_id, ObjectInner::DnsServer(DnsServer::GoogleCloudDns(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Alidns(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::ArvanCloud(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Autodns(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::AzureDns(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::BaiduCloud(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::BluecatV2(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::ClouDns(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Constellix(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Cpanel(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Ddnss(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::DnsMadeEasy(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Domeneshop(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Dreamhost(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::DuckDns(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Dynu(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::EasyDns(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::EdgeDns(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Exoscale(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::FreeMyIp(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::GandiV5(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Gcore(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Glesys(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Godaddy(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Hetzner(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::HostingDe(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Hostinger(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::HuaweiCloud(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Hurricane(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::IbmCloud(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Infoblox(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Infomaniak(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Inwx(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Ionos(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Ipv64(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Joker(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Lightsail(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Linode(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::LuaDns(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::MythicBeasts(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Namecheap(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::NameDotCom(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::NameSilo(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Netcup(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Netlify(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Nifcloud(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Ns1(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::OracleCloud(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Plesk(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Safedns(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Scaleway(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::TencentCloud(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Transip(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::UltraDns(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Vercel(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Volcengine(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::Vultr(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::WebSupport(obj)) => obj.member_tenant_id, + ObjectInner::DnsServer(DnsServer::YandexCloud(obj)) => obj.member_tenant_id, ObjectInner::Domain(obj) => obj.member_tenant_id, ObjectInner::MailingList(obj) => obj.member_tenant_id, ObjectInner::OAuthClient(obj) => obj.member_tenant_id, @@ -4271,7 +4433,6 @@ impl ObjectInner { } ObjectInner::DmarcExternalReport(obj) => obj.member_tenant_id = Some(id), ObjectInner::DnsServer(DnsServer::Tsig(obj)) => obj.member_tenant_id = Some(id), - ObjectInner::DnsServer(DnsServer::Sig0(obj)) => obj.member_tenant_id = Some(id), ObjectInner::DnsServer(DnsServer::Cloudflare(obj)) => obj.member_tenant_id = Some(id), ObjectInner::DnsServer(DnsServer::DigitalOcean(obj)) => obj.member_tenant_id = Some(id), ObjectInner::DnsServer(DnsServer::DeSEC(obj)) => obj.member_tenant_id = Some(id), @@ -4284,6 +4445,64 @@ impl ObjectInner { ObjectInner::DnsServer(DnsServer::GoogleCloudDns(obj)) => { obj.member_tenant_id = Some(id) } + ObjectInner::DnsServer(DnsServer::Alidns(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::ArvanCloud(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Autodns(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::AzureDns(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::BaiduCloud(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::BluecatV2(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::ClouDns(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Constellix(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Cpanel(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Ddnss(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::DnsMadeEasy(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Domeneshop(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Dreamhost(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::DuckDns(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Dynu(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::EasyDns(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::EdgeDns(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Exoscale(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::FreeMyIp(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::GandiV5(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Gcore(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Glesys(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Godaddy(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Hetzner(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::HostingDe(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Hostinger(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::HuaweiCloud(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Hurricane(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::IbmCloud(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Infoblox(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Infomaniak(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Inwx(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Ionos(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Ipv64(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Joker(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Lightsail(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Linode(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::LuaDns(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::MythicBeasts(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Namecheap(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::NameDotCom(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::NameSilo(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Netcup(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Netlify(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Nifcloud(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Ns1(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::OracleCloud(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Plesk(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Safedns(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Scaleway(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::TencentCloud(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Transip(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::UltraDns(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Vercel(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Volcengine(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::Vultr(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::WebSupport(obj)) => obj.member_tenant_id = Some(id), + ObjectInner::DnsServer(DnsServer::YandexCloud(obj)) => obj.member_tenant_id = Some(id), ObjectInner::Domain(obj) => obj.member_tenant_id = Some(id), ObjectInner::MailingList(obj) => obj.member_tenant_id = Some(id), ObjectInner::OAuthClient(obj) => obj.member_tenant_id = Some(id), diff --git a/crates/registry/src/schema/structs.rs b/crates/registry/src/schema/structs.rs index 3b867bfb..92949fe2 100644 --- a/crates/registry/src/schema/structs.rs +++ b/crates/registry/src/schema/structs.rs @@ -1344,7 +1344,7 @@ pub struct DnsResolverTls { #[serde(tag = "@type")] pub enum DnsServer { Tsig(DnsServerTsig), - Sig0(DnsServerSig0), + Deprecated1, Cloudflare(DnsServerCloudflare), DigitalOcean(DnsServerCloud), DeSEC(DnsServerCloud), @@ -1355,6 +1355,203 @@ pub enum DnsServer { Spaceship(DnsServerSpaceship), Route53(DnsServerRoute53), GoogleCloudDns(DnsServerGoogleCloudDns), + Alidns(DnsServerAlidns), + ArvanCloud(DnsServerCloud), + Autodns(DnsServerAutodns), + AzureDns(DnsServerAzureDns), + BaiduCloud(DnsServerBaiduCloud), + BluecatV2(DnsServerBluecatV2), + ClouDns(DnsServerClouDns), + Constellix(DnsServerConstellix), + Cpanel(DnsServerCpanel), + Ddnss(DnsServerCloud), + DnsMadeEasy(DnsServerDnsMadeEasy), + Domeneshop(DnsServerDomeneshop), + Dreamhost(DnsServerCloud), + DuckDns(DnsServerCloud), + Dynu(DnsServerCloud), + EasyDns(DnsServerEasyDns), + EdgeDns(DnsServerEdgeDns), + Exoscale(DnsServerExoscale), + FreeMyIp(DnsServerCloud), + GandiV5(DnsServerCloud), + Gcore(DnsServerCloud), + Glesys(DnsServerGlesys), + Godaddy(DnsServerGodaddy), + Hetzner(DnsServerCloud), + HostingDe(DnsServerCloud), + Hostinger(DnsServerCloud), + HuaweiCloud(DnsServerHuaweiCloud), + Hurricane(DnsServerHurricane), + IbmCloud(DnsServerIbmCloud), + Infoblox(DnsServerInfoblox), + Infomaniak(DnsServerCloud), + Inwx(DnsServerInwx), + Ionos(DnsServerCloud), + Ipv64(DnsServerCloud), + Joker(DnsServerJoker), + Lightsail(DnsServerLightsail), + Linode(DnsServerCloud), + LuaDns(DnsServerLuaDns), + MythicBeasts(DnsServerMythicBeasts), + Namecheap(DnsServerNamecheap), + NameDotCom(DnsServerNameDotCom), + NameSilo(DnsServerCloud), + Netcup(DnsServerNetcup), + Netlify(DnsServerCloud), + Nifcloud(DnsServerNifcloud), + Ns1(DnsServerCloud), + OracleCloud(DnsServerOracleCloud), + Plesk(DnsServerPlesk), + Safedns(DnsServerCloud), + Scaleway(DnsServerCloud), + TencentCloud(DnsServerTencentCloud), + Transip(DnsServerTransip), + UltraDns(DnsServerUltraDns), + Vercel(DnsServerVercel), + Volcengine(DnsServerVolcengine), + Vultr(DnsServerCloud), + WebSupport(DnsServerWebSupport), + YandexCloud(DnsServerYandexCloud), +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerAlidns { + #[serde(rename = "accessKey")] + pub access_key: String, + #[serde(rename = "secretKey")] + pub secret_key: SecretKey, + #[serde(rename = "region")] + pub region: Option, + #[serde(rename = "securityToken")] + pub security_token: SecretKeyOptional, + #[serde(rename = "line")] + pub line: Option, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerAutodns { + #[serde(rename = "username")] + pub username: String, + #[serde(rename = "password")] + pub password: SecretKey, + #[serde(rename = "context")] + pub context: Option, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerAzureDns { + #[serde(rename = "tenantId")] + pub tenant_id: String, + #[serde(rename = "clientId")] + pub client_id: String, + #[serde(rename = "clientSecret")] + pub client_secret: SecretKey, + #[serde(rename = "subscriptionId")] + pub subscription_id: String, + #[serde(rename = "resourceGroup")] + pub resource_group: String, + #[serde(rename = "environment")] + pub environment: AzureEnvironment, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerBaiduCloud { + #[serde(rename = "accessKey")] + pub access_key: String, + #[serde(rename = "secretKey")] + pub secret_key: SecretKey, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerBluecatV2 { + #[serde(rename = "baseUrl")] + pub base_url: String, + #[serde(rename = "username")] + pub username: String, + #[serde(rename = "password")] + pub password: SecretKey, + #[serde(rename = "configName")] + pub config_name: String, + #[serde(rename = "viewName")] + pub view_name: String, + #[serde(rename = "skipDeploy")] + pub skip_deploy: bool, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, } #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] @@ -1362,7 +1559,7 @@ pub enum DnsServer { pub enum DnsServerBootstrap { Manual, Tsig(DnsServerTsig), - Sig0(DnsServerSig0), + Deprecated1, Cloudflare(DnsServerCloudflare), DigitalOcean(DnsServerCloud), DeSEC(DnsServerCloud), @@ -1373,6 +1570,89 @@ pub enum DnsServerBootstrap { Spaceship(DnsServerSpaceship), Route53(DnsServerRoute53), GoogleCloudDns(DnsServerGoogleCloudDns), + Alidns(DnsServerAlidns), + ArvanCloud(DnsServerCloud), + Autodns(DnsServerAutodns), + AzureDns(DnsServerAzureDns), + BaiduCloud(DnsServerBaiduCloud), + BluecatV2(DnsServerBluecatV2), + ClouDns(DnsServerClouDns), + Constellix(DnsServerConstellix), + Cpanel(DnsServerCpanel), + Ddnss(DnsServerCloud), + DnsMadeEasy(DnsServerDnsMadeEasy), + Domeneshop(DnsServerDomeneshop), + Dreamhost(DnsServerCloud), + DuckDns(DnsServerCloud), + Dynu(DnsServerCloud), + EasyDns(DnsServerEasyDns), + EdgeDns(DnsServerEdgeDns), + Exoscale(DnsServerExoscale), + FreeMyIp(DnsServerCloud), + GandiV5(DnsServerCloud), + Gcore(DnsServerCloud), + Glesys(DnsServerGlesys), + Godaddy(DnsServerGodaddy), + Hetzner(DnsServerCloud), + HostingDe(DnsServerCloud), + Hostinger(DnsServerCloud), + HuaweiCloud(DnsServerHuaweiCloud), + Hurricane(DnsServerHurricane), + IbmCloud(DnsServerIbmCloud), + Infoblox(DnsServerInfoblox), + Infomaniak(DnsServerCloud), + Inwx(DnsServerInwx), + Ionos(DnsServerCloud), + Ipv64(DnsServerCloud), + Joker(DnsServerJoker), + Lightsail(DnsServerLightsail), + Linode(DnsServerCloud), + LuaDns(DnsServerLuaDns), + MythicBeasts(DnsServerMythicBeasts), + Namecheap(DnsServerNamecheap), + NameDotCom(DnsServerNameDotCom), + NameSilo(DnsServerCloud), + Netcup(DnsServerNetcup), + Netlify(DnsServerCloud), + Nifcloud(DnsServerNifcloud), + Ns1(DnsServerCloud), + OracleCloud(DnsServerOracleCloud), + Plesk(DnsServerPlesk), + Safedns(DnsServerCloud), + Scaleway(DnsServerCloud), + TencentCloud(DnsServerTencentCloud), + Transip(DnsServerTransip), + UltraDns(DnsServerUltraDns), + Vercel(DnsServerVercel), + Volcengine(DnsServerVolcengine), + Vultr(DnsServerCloud), + WebSupport(DnsServerWebSupport), + YandexCloud(DnsServerYandexCloud), +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerClouDns { + #[serde(rename = "authId")] + pub auth_id: Option, + #[serde(rename = "subAuthId")] + pub sub_auth_id: Option, + #[serde(rename = "password")] + pub password: SecretKey, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, } #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] @@ -1399,8 +1679,77 @@ pub struct DnsServerCloud { #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(default)] pub struct DnsServerCloudflare { - #[serde(rename = "email")] - pub email: Option, + #[serde(rename = "secret")] + pub secret: SecretKey, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerConstellix { + #[serde(rename = "apiKey")] + pub api_key: String, + #[serde(rename = "secretKey")] + pub secret_key: SecretKey, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerCpanel { + #[serde(rename = "baseUrl")] + pub base_url: String, + #[serde(rename = "username")] + pub username: String, + #[serde(rename = "token")] + pub token: SecretKey, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerDnsMadeEasy { + #[serde(rename = "apiKey")] + pub api_key: String, #[serde(rename = "secret")] pub secret: SecretKey, #[serde(rename = "description")] @@ -1426,6 +1775,148 @@ pub struct DnsServerDnsimple { pub auth_token: SecretKey, #[serde(rename = "accountIdentifier")] pub account_identifier: String, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerDomeneshop { + #[serde(rename = "authToken")] + pub auth_token: String, + #[serde(rename = "secret")] + pub secret: SecretKey, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerEasyDns { + #[serde(rename = "token")] + pub token: String, + #[serde(rename = "key")] + pub key: SecretKey, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerEdgeDns { + #[serde(rename = "host")] + pub host: String, + #[serde(rename = "clientToken")] + pub client_token: String, + #[serde(rename = "clientSecret")] + pub client_secret: SecretKey, + #[serde(rename = "accessToken")] + pub access_token: SecretKey, + #[serde(rename = "accountSwitchKey")] + pub account_switch_key: Option, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerExoscale { + #[serde(rename = "apiKey")] + pub api_key: String, + #[serde(rename = "secret")] + pub secret: SecretKey, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerGlesys { + #[serde(rename = "apiUser")] + pub api_user: String, + #[serde(rename = "apiKey")] + pub api_key: SecretKey, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerGodaddy { + #[serde(rename = "apiKey")] + pub api_key: String, #[serde(rename = "secret")] pub secret: SecretKey, #[serde(rename = "description")] @@ -1473,6 +1964,360 @@ pub struct DnsServerGoogleCloudDns { pub propagation_delay: Option, } +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerHuaweiCloud { + #[serde(rename = "accessKey")] + pub access_key: String, + #[serde(rename = "secretKey")] + pub secret_key: SecretKey, + #[serde(rename = "region")] + pub region: String, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerHurricane { + #[serde(rename = "credentials")] + pub credentials: List, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerIbmCloud { + #[serde(rename = "username")] + pub username: String, + #[serde(rename = "apiKey")] + pub api_key: SecretKey, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerInfoblox { + #[serde(rename = "host")] + pub host: String, + #[serde(rename = "port")] + pub port: Option, + #[serde(rename = "username")] + pub username: String, + #[serde(rename = "password")] + pub password: SecretKey, + #[serde(rename = "wapiVersion")] + pub wapi_version: Option, + #[serde(rename = "dnsView")] + pub dns_view: Option, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerInwx { + #[serde(rename = "username")] + pub username: String, + #[serde(rename = "password")] + pub password: SecretKey, + #[serde(rename = "sharedSecret")] + pub shared_secret: SecretKeyOptional, + #[serde(rename = "sandbox")] + pub sandbox: bool, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerJoker { + #[serde(rename = "auth")] + pub auth: JokerAuth, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerLightsail { + #[serde(rename = "accessKeyId")] + pub access_key_id: String, + #[serde(rename = "secretAccessKey")] + pub secret_access_key: SecretKey, + #[serde(rename = "sessionToken")] + pub session_token: SecretKeyOptional, + #[serde(rename = "region")] + pub region: Option, + #[serde(rename = "domain")] + pub domain: Option, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerLuaDns { + #[serde(rename = "username")] + pub username: String, + #[serde(rename = "authToken")] + pub auth_token: SecretKey, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerMythicBeasts { + #[serde(rename = "username")] + pub username: String, + #[serde(rename = "password")] + pub password: SecretKey, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerNameDotCom { + #[serde(rename = "username")] + pub username: String, + #[serde(rename = "authToken")] + pub auth_token: SecretKey, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerNamecheap { + #[serde(rename = "apiUser")] + pub api_user: String, + #[serde(rename = "apiKey")] + pub api_key: SecretKey, + #[serde(rename = "clientIp")] + pub client_ip: String, + #[serde(rename = "username")] + pub username: Option, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerNetcup { + #[serde(rename = "customerNumber")] + pub customer_number: String, + #[serde(rename = "apiKey")] + pub api_key: String, + #[serde(rename = "password")] + pub password: SecretKey, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerNifcloud { + #[serde(rename = "accessKey")] + pub access_key: String, + #[serde(rename = "secretKey")] + pub secret_key: SecretKey, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerOracleCloud { + #[serde(rename = "tenancyOcid")] + pub tenancy_ocid: String, + #[serde(rename = "userOcid")] + pub user_ocid: String, + #[serde(rename = "fingerprint")] + pub fingerprint: String, + #[serde(rename = "privateKeyPem")] + pub private_key_pem: SecretText, + #[serde(rename = "privateKeyPassword")] + pub private_key_password: SecretKeyOptional, + #[serde(rename = "region")] + pub region: String, + #[serde(rename = "compartmentOcid")] + pub compartment_ocid: String, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(default)] pub struct DnsServerOvh { @@ -1500,6 +2345,29 @@ pub struct DnsServerOvh { pub propagation_delay: Option, } +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerPlesk { + #[serde(rename = "baseUrl")] + pub base_url: String, + #[serde(rename = "apiKey")] + pub api_key: SecretKey, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(default)] pub struct DnsServerPorkbun { @@ -1507,8 +2375,6 @@ pub struct DnsServerPorkbun { pub api_key: String, #[serde(rename = "secretApiKey")] pub secret_api_key: SecretKey, - #[serde(rename = "secret")] - pub secret: SecretKey, #[serde(rename = "description")] pub description: String, #[serde(rename = "memberTenantId")] @@ -1558,21 +2424,11 @@ pub struct DnsServerRoute53 { #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(default)] -pub struct DnsServerSig0 { - #[serde(rename = "host")] - pub host: IpAddr, - #[serde(rename = "port")] - pub port: u64, - #[serde(rename = "publicKey")] - pub public_key: String, - #[serde(rename = "key")] - pub key: SecretText, - #[serde(rename = "signerName")] - pub signer_name: String, - #[serde(rename = "protocol")] - pub protocol: IpProtocol, - #[serde(rename = "sig0Algorithm")] - pub sig0_algorithm: Sig0Algorithm, +pub struct DnsServerSpaceship { + #[serde(rename = "apiKey")] + pub api_key: String, + #[serde(rename = "secret")] + pub secret: SecretKey, #[serde(rename = "description")] pub description: String, #[serde(rename = "memberTenantId")] @@ -1591,11 +2447,38 @@ pub struct DnsServerSig0 { #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(default)] -pub struct DnsServerSpaceship { - #[serde(rename = "apiKey")] - pub api_key: String, - #[serde(rename = "secret")] - pub secret: SecretKey, +pub struct DnsServerTencentCloud { + #[serde(rename = "secretId")] + pub secret_id: String, + #[serde(rename = "secretKey")] + pub secret_key: SecretKey, + #[serde(rename = "region")] + pub region: Option, + #[serde(rename = "sessionToken")] + pub session_token: SecretKeyOptional, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerTransip { + #[serde(rename = "username")] + pub username: String, + #[serde(rename = "privateKeyPem")] + pub private_key_pem: SecretText, #[serde(rename = "description")] pub description: String, #[serde(rename = "memberTenantId")] @@ -1643,6 +2526,129 @@ pub struct DnsServerTsig { pub propagation_delay: Option, } +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerUltraDns { + #[serde(rename = "username")] + pub username: String, + #[serde(rename = "password")] + pub password: SecretKey, + #[serde(rename = "endpoint")] + pub endpoint: Option, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerVercel { + #[serde(rename = "authToken")] + pub auth_token: SecretKey, + #[serde(rename = "teamId")] + pub team_id: Option, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerVolcengine { + #[serde(rename = "accessKey")] + pub access_key: String, + #[serde(rename = "secretKey")] + pub secret_key: SecretKey, + #[serde(rename = "region")] + pub region: Option, + #[serde(rename = "host")] + pub host: Option, + #[serde(rename = "scheme")] + pub scheme: Option, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerWebSupport { + #[serde(rename = "apiKey")] + pub api_key: String, + #[serde(rename = "secret")] + pub secret: SecretKey, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct DnsServerYandexCloud { + #[serde(rename = "apiKey")] + pub api_key: SecretText, + #[serde(rename = "folderId")] + pub folder_id: String, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "memberTenantId")] + pub member_tenant_id: Option, + #[serde(rename = "timeout")] + pub timeout: Duration, + #[serde(rename = "ttl")] + pub ttl: Duration, + #[serde(rename = "pollingInterval")] + pub polling_interval: Duration, + #[serde(rename = "propagationTimeout")] + pub propagation_timeout: Duration, + #[serde(rename = "propagationDelay")] + pub propagation_delay: Option, +} + #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(default)] pub struct Domain { @@ -2024,6 +3030,15 @@ pub enum HttpLookupFormat { List, } +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct HurricaneCredential { + #[serde(rename = "zone")] + pub zone: String, + #[serde(rename = "secret")] + pub secret: SecretKey, +} + #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(default)] pub struct Imap { @@ -2122,6 +3137,29 @@ pub struct Jmap { pub max_subscriptions: Option, } +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(tag = "@type")] +pub enum JokerAuth { + ApiKey(JokerAuthApiKey), + UsernamePassword(JokerAuthUsernamePassword), +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct JokerAuthApiKey { + #[serde(rename = "apiKey")] + pub api_key: SecretKey, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default)] +pub struct JokerAuthUsernamePassword { + #[serde(rename = "username")] + pub username: String, + #[serde(rename = "password")] + pub password: SecretKey, +} + #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(default)] pub struct KafkaCoordinator { diff --git a/crates/registry/src/schema/structs_impl.rs b/crates/registry/src/schema/structs_impl.rs index 254b0418..7d797331 100644 --- a/crates/registry/src/schema/structs_impl.rs +++ b/crates/registry/src/schema/structs_impl.rs @@ -10195,13 +10195,13 @@ impl RegistryJsonPropertyPatch for DnsResolverTls { impl ObjectImpl for DnsServer { const FLAGS: u64 = OBJ_FILTER_TENANT; - const VERSION: u8 = 0; + const VERSION: u8 = 1; const OBJECT: ObjectType = ObjectType::DnsServer; fn validate(&self, errors: &mut Vec) -> bool { match self { DnsServer::Tsig(inner) => inner.validate(errors), - DnsServer::Sig0(inner) => inner.validate(errors), + DnsServer::Deprecated1 => true, DnsServer::Cloudflare(inner) => inner.validate(errors), DnsServer::DigitalOcean(inner) => inner.validate(errors), DnsServer::DeSEC(inner) => inner.validate(errors), @@ -10212,6 +10212,64 @@ impl ObjectImpl for DnsServer { DnsServer::Spaceship(inner) => inner.validate(errors), DnsServer::Route53(inner) => inner.validate(errors), DnsServer::GoogleCloudDns(inner) => inner.validate(errors), + DnsServer::Alidns(inner) => inner.validate(errors), + DnsServer::ArvanCloud(inner) => inner.validate(errors), + DnsServer::Autodns(inner) => inner.validate(errors), + DnsServer::AzureDns(inner) => inner.validate(errors), + DnsServer::BaiduCloud(inner) => inner.validate(errors), + DnsServer::BluecatV2(inner) => inner.validate(errors), + DnsServer::ClouDns(inner) => inner.validate(errors), + DnsServer::Constellix(inner) => inner.validate(errors), + DnsServer::Cpanel(inner) => inner.validate(errors), + DnsServer::Ddnss(inner) => inner.validate(errors), + DnsServer::DnsMadeEasy(inner) => inner.validate(errors), + DnsServer::Domeneshop(inner) => inner.validate(errors), + DnsServer::Dreamhost(inner) => inner.validate(errors), + DnsServer::DuckDns(inner) => inner.validate(errors), + DnsServer::Dynu(inner) => inner.validate(errors), + DnsServer::EasyDns(inner) => inner.validate(errors), + DnsServer::EdgeDns(inner) => inner.validate(errors), + DnsServer::Exoscale(inner) => inner.validate(errors), + DnsServer::FreeMyIp(inner) => inner.validate(errors), + DnsServer::GandiV5(inner) => inner.validate(errors), + DnsServer::Gcore(inner) => inner.validate(errors), + DnsServer::Glesys(inner) => inner.validate(errors), + DnsServer::Godaddy(inner) => inner.validate(errors), + DnsServer::Hetzner(inner) => inner.validate(errors), + DnsServer::HostingDe(inner) => inner.validate(errors), + DnsServer::Hostinger(inner) => inner.validate(errors), + DnsServer::HuaweiCloud(inner) => inner.validate(errors), + DnsServer::Hurricane(inner) => inner.validate(errors), + DnsServer::IbmCloud(inner) => inner.validate(errors), + DnsServer::Infoblox(inner) => inner.validate(errors), + DnsServer::Infomaniak(inner) => inner.validate(errors), + DnsServer::Inwx(inner) => inner.validate(errors), + DnsServer::Ionos(inner) => inner.validate(errors), + DnsServer::Ipv64(inner) => inner.validate(errors), + DnsServer::Joker(inner) => inner.validate(errors), + DnsServer::Lightsail(inner) => inner.validate(errors), + DnsServer::Linode(inner) => inner.validate(errors), + DnsServer::LuaDns(inner) => inner.validate(errors), + DnsServer::MythicBeasts(inner) => inner.validate(errors), + DnsServer::Namecheap(inner) => inner.validate(errors), + DnsServer::NameDotCom(inner) => inner.validate(errors), + DnsServer::NameSilo(inner) => inner.validate(errors), + DnsServer::Netcup(inner) => inner.validate(errors), + DnsServer::Netlify(inner) => inner.validate(errors), + DnsServer::Nifcloud(inner) => inner.validate(errors), + DnsServer::Ns1(inner) => inner.validate(errors), + DnsServer::OracleCloud(inner) => inner.validate(errors), + DnsServer::Plesk(inner) => inner.validate(errors), + DnsServer::Safedns(inner) => inner.validate(errors), + DnsServer::Scaleway(inner) => inner.validate(errors), + DnsServer::TencentCloud(inner) => inner.validate(errors), + DnsServer::Transip(inner) => inner.validate(errors), + DnsServer::UltraDns(inner) => inner.validate(errors), + DnsServer::Vercel(inner) => inner.validate(errors), + DnsServer::Volcengine(inner) => inner.validate(errors), + DnsServer::Vultr(inner) => inner.validate(errors), + DnsServer::WebSupport(inner) => inner.validate(errors), + DnsServer::YandexCloud(inner) => inner.validate(errors), } } @@ -10220,9 +10278,7 @@ impl ObjectImpl for DnsServer { DnsServer::Tsig(object) => { object.index(i); } - DnsServer::Sig0(object) => { - object.index(i); - } + DnsServer::Deprecated1 => {} DnsServer::Cloudflare(object) => { object.index(i); } @@ -10253,6 +10309,180 @@ impl ObjectImpl for DnsServer { DnsServer::GoogleCloudDns(object) => { object.index(i); } + DnsServer::Alidns(object) => { + object.index(i); + } + DnsServer::ArvanCloud(object) => { + object.index(i); + } + DnsServer::Autodns(object) => { + object.index(i); + } + DnsServer::AzureDns(object) => { + object.index(i); + } + DnsServer::BaiduCloud(object) => { + object.index(i); + } + DnsServer::BluecatV2(object) => { + object.index(i); + } + DnsServer::ClouDns(object) => { + object.index(i); + } + DnsServer::Constellix(object) => { + object.index(i); + } + DnsServer::Cpanel(object) => { + object.index(i); + } + DnsServer::Ddnss(object) => { + object.index(i); + } + DnsServer::DnsMadeEasy(object) => { + object.index(i); + } + DnsServer::Domeneshop(object) => { + object.index(i); + } + DnsServer::Dreamhost(object) => { + object.index(i); + } + DnsServer::DuckDns(object) => { + object.index(i); + } + DnsServer::Dynu(object) => { + object.index(i); + } + DnsServer::EasyDns(object) => { + object.index(i); + } + DnsServer::EdgeDns(object) => { + object.index(i); + } + DnsServer::Exoscale(object) => { + object.index(i); + } + DnsServer::FreeMyIp(object) => { + object.index(i); + } + DnsServer::GandiV5(object) => { + object.index(i); + } + DnsServer::Gcore(object) => { + object.index(i); + } + DnsServer::Glesys(object) => { + object.index(i); + } + DnsServer::Godaddy(object) => { + object.index(i); + } + DnsServer::Hetzner(object) => { + object.index(i); + } + DnsServer::HostingDe(object) => { + object.index(i); + } + DnsServer::Hostinger(object) => { + object.index(i); + } + DnsServer::HuaweiCloud(object) => { + object.index(i); + } + DnsServer::Hurricane(object) => { + object.index(i); + } + DnsServer::IbmCloud(object) => { + object.index(i); + } + DnsServer::Infoblox(object) => { + object.index(i); + } + DnsServer::Infomaniak(object) => { + object.index(i); + } + DnsServer::Inwx(object) => { + object.index(i); + } + DnsServer::Ionos(object) => { + object.index(i); + } + DnsServer::Ipv64(object) => { + object.index(i); + } + DnsServer::Joker(object) => { + object.index(i); + } + DnsServer::Lightsail(object) => { + object.index(i); + } + DnsServer::Linode(object) => { + object.index(i); + } + DnsServer::LuaDns(object) => { + object.index(i); + } + DnsServer::MythicBeasts(object) => { + object.index(i); + } + DnsServer::Namecheap(object) => { + object.index(i); + } + DnsServer::NameDotCom(object) => { + object.index(i); + } + DnsServer::NameSilo(object) => { + object.index(i); + } + DnsServer::Netcup(object) => { + object.index(i); + } + DnsServer::Netlify(object) => { + object.index(i); + } + DnsServer::Nifcloud(object) => { + object.index(i); + } + DnsServer::Ns1(object) => { + object.index(i); + } + DnsServer::OracleCloud(object) => { + object.index(i); + } + DnsServer::Plesk(object) => { + object.index(i); + } + DnsServer::Safedns(object) => { + object.index(i); + } + DnsServer::Scaleway(object) => { + object.index(i); + } + DnsServer::TencentCloud(object) => { + object.index(i); + } + DnsServer::Transip(object) => { + object.index(i); + } + DnsServer::UltraDns(object) => { + object.index(i); + } + DnsServer::Vercel(object) => { + object.index(i); + } + DnsServer::Volcengine(object) => { + object.index(i); + } + DnsServer::Vultr(object) => { + object.index(i); + } + DnsServer::WebSupport(object) => { + object.index(i); + } + DnsServer::YandexCloud(object) => { + object.index(i); + } } } } @@ -10270,9 +10500,8 @@ impl Pickle for DnsServer { 0u16.pickle(out); inner.pickle(out); } - DnsServer::Sig0(inner) => { + DnsServer::Deprecated1 => { 1u16.pickle(out); - inner.pickle(out); } DnsServer::Cloudflare(inner) => { 2u16.pickle(out); @@ -10314,13 +10543,245 @@ impl Pickle for DnsServer { 11u16.pickle(out); inner.pickle(out); } + DnsServer::Alidns(inner) => { + 12u16.pickle(out); + inner.pickle(out); + } + DnsServer::ArvanCloud(inner) => { + 13u16.pickle(out); + inner.pickle(out); + } + DnsServer::Autodns(inner) => { + 14u16.pickle(out); + inner.pickle(out); + } + DnsServer::AzureDns(inner) => { + 15u16.pickle(out); + inner.pickle(out); + } + DnsServer::BaiduCloud(inner) => { + 16u16.pickle(out); + inner.pickle(out); + } + DnsServer::BluecatV2(inner) => { + 17u16.pickle(out); + inner.pickle(out); + } + DnsServer::ClouDns(inner) => { + 18u16.pickle(out); + inner.pickle(out); + } + DnsServer::Constellix(inner) => { + 19u16.pickle(out); + inner.pickle(out); + } + DnsServer::Cpanel(inner) => { + 20u16.pickle(out); + inner.pickle(out); + } + DnsServer::Ddnss(inner) => { + 21u16.pickle(out); + inner.pickle(out); + } + DnsServer::DnsMadeEasy(inner) => { + 22u16.pickle(out); + inner.pickle(out); + } + DnsServer::Domeneshop(inner) => { + 23u16.pickle(out); + inner.pickle(out); + } + DnsServer::Dreamhost(inner) => { + 24u16.pickle(out); + inner.pickle(out); + } + DnsServer::DuckDns(inner) => { + 25u16.pickle(out); + inner.pickle(out); + } + DnsServer::Dynu(inner) => { + 26u16.pickle(out); + inner.pickle(out); + } + DnsServer::EasyDns(inner) => { + 27u16.pickle(out); + inner.pickle(out); + } + DnsServer::EdgeDns(inner) => { + 28u16.pickle(out); + inner.pickle(out); + } + DnsServer::Exoscale(inner) => { + 29u16.pickle(out); + inner.pickle(out); + } + DnsServer::FreeMyIp(inner) => { + 30u16.pickle(out); + inner.pickle(out); + } + DnsServer::GandiV5(inner) => { + 31u16.pickle(out); + inner.pickle(out); + } + DnsServer::Gcore(inner) => { + 32u16.pickle(out); + inner.pickle(out); + } + DnsServer::Glesys(inner) => { + 33u16.pickle(out); + inner.pickle(out); + } + DnsServer::Godaddy(inner) => { + 34u16.pickle(out); + inner.pickle(out); + } + DnsServer::Hetzner(inner) => { + 35u16.pickle(out); + inner.pickle(out); + } + DnsServer::HostingDe(inner) => { + 36u16.pickle(out); + inner.pickle(out); + } + DnsServer::Hostinger(inner) => { + 37u16.pickle(out); + inner.pickle(out); + } + DnsServer::HuaweiCloud(inner) => { + 38u16.pickle(out); + inner.pickle(out); + } + DnsServer::Hurricane(inner) => { + 39u16.pickle(out); + inner.pickle(out); + } + DnsServer::IbmCloud(inner) => { + 40u16.pickle(out); + inner.pickle(out); + } + DnsServer::Infoblox(inner) => { + 41u16.pickle(out); + inner.pickle(out); + } + DnsServer::Infomaniak(inner) => { + 42u16.pickle(out); + inner.pickle(out); + } + DnsServer::Inwx(inner) => { + 43u16.pickle(out); + inner.pickle(out); + } + DnsServer::Ionos(inner) => { + 44u16.pickle(out); + inner.pickle(out); + } + DnsServer::Ipv64(inner) => { + 45u16.pickle(out); + inner.pickle(out); + } + DnsServer::Joker(inner) => { + 46u16.pickle(out); + inner.pickle(out); + } + DnsServer::Lightsail(inner) => { + 47u16.pickle(out); + inner.pickle(out); + } + DnsServer::Linode(inner) => { + 48u16.pickle(out); + inner.pickle(out); + } + DnsServer::LuaDns(inner) => { + 49u16.pickle(out); + inner.pickle(out); + } + DnsServer::MythicBeasts(inner) => { + 50u16.pickle(out); + inner.pickle(out); + } + DnsServer::Namecheap(inner) => { + 51u16.pickle(out); + inner.pickle(out); + } + DnsServer::NameDotCom(inner) => { + 52u16.pickle(out); + inner.pickle(out); + } + DnsServer::NameSilo(inner) => { + 53u16.pickle(out); + inner.pickle(out); + } + DnsServer::Netcup(inner) => { + 54u16.pickle(out); + inner.pickle(out); + } + DnsServer::Netlify(inner) => { + 55u16.pickle(out); + inner.pickle(out); + } + DnsServer::Nifcloud(inner) => { + 56u16.pickle(out); + inner.pickle(out); + } + DnsServer::Ns1(inner) => { + 57u16.pickle(out); + inner.pickle(out); + } + DnsServer::OracleCloud(inner) => { + 58u16.pickle(out); + inner.pickle(out); + } + DnsServer::Plesk(inner) => { + 59u16.pickle(out); + inner.pickle(out); + } + DnsServer::Safedns(inner) => { + 60u16.pickle(out); + inner.pickle(out); + } + DnsServer::Scaleway(inner) => { + 61u16.pickle(out); + inner.pickle(out); + } + DnsServer::TencentCloud(inner) => { + 62u16.pickle(out); + inner.pickle(out); + } + DnsServer::Transip(inner) => { + 63u16.pickle(out); + inner.pickle(out); + } + DnsServer::UltraDns(inner) => { + 64u16.pickle(out); + inner.pickle(out); + } + DnsServer::Vercel(inner) => { + 65u16.pickle(out); + inner.pickle(out); + } + DnsServer::Volcengine(inner) => { + 66u16.pickle(out); + inner.pickle(out); + } + DnsServer::Vultr(inner) => { + 67u16.pickle(out); + inner.pickle(out); + } + DnsServer::WebSupport(inner) => { + 68u16.pickle(out); + inner.pickle(out); + } + DnsServer::YandexCloud(inner) => { + 69u16.pickle(out); + inner.pickle(out); + } } } fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { match u16::unpickle(stream)? { 0 => Pickle::unpickle(stream).map(DnsServer::Tsig), - 1 => Pickle::unpickle(stream).map(DnsServer::Sig0), + 1 => Some(DnsServer::Deprecated1), 2 => Pickle::unpickle(stream).map(DnsServer::Cloudflare), 3 => Pickle::unpickle(stream).map(DnsServer::DigitalOcean), 4 => Pickle::unpickle(stream).map(DnsServer::DeSEC), @@ -10331,6 +10792,64 @@ impl Pickle for DnsServer { 9 => Pickle::unpickle(stream).map(DnsServer::Spaceship), 10 => Pickle::unpickle(stream).map(DnsServer::Route53), 11 => Pickle::unpickle(stream).map(DnsServer::GoogleCloudDns), + 12 => Pickle::unpickle(stream).map(DnsServer::Alidns), + 13 => Pickle::unpickle(stream).map(DnsServer::ArvanCloud), + 14 => Pickle::unpickle(stream).map(DnsServer::Autodns), + 15 => Pickle::unpickle(stream).map(DnsServer::AzureDns), + 16 => Pickle::unpickle(stream).map(DnsServer::BaiduCloud), + 17 => Pickle::unpickle(stream).map(DnsServer::BluecatV2), + 18 => Pickle::unpickle(stream).map(DnsServer::ClouDns), + 19 => Pickle::unpickle(stream).map(DnsServer::Constellix), + 20 => Pickle::unpickle(stream).map(DnsServer::Cpanel), + 21 => Pickle::unpickle(stream).map(DnsServer::Ddnss), + 22 => Pickle::unpickle(stream).map(DnsServer::DnsMadeEasy), + 23 => Pickle::unpickle(stream).map(DnsServer::Domeneshop), + 24 => Pickle::unpickle(stream).map(DnsServer::Dreamhost), + 25 => Pickle::unpickle(stream).map(DnsServer::DuckDns), + 26 => Pickle::unpickle(stream).map(DnsServer::Dynu), + 27 => Pickle::unpickle(stream).map(DnsServer::EasyDns), + 28 => Pickle::unpickle(stream).map(DnsServer::EdgeDns), + 29 => Pickle::unpickle(stream).map(DnsServer::Exoscale), + 30 => Pickle::unpickle(stream).map(DnsServer::FreeMyIp), + 31 => Pickle::unpickle(stream).map(DnsServer::GandiV5), + 32 => Pickle::unpickle(stream).map(DnsServer::Gcore), + 33 => Pickle::unpickle(stream).map(DnsServer::Glesys), + 34 => Pickle::unpickle(stream).map(DnsServer::Godaddy), + 35 => Pickle::unpickle(stream).map(DnsServer::Hetzner), + 36 => Pickle::unpickle(stream).map(DnsServer::HostingDe), + 37 => Pickle::unpickle(stream).map(DnsServer::Hostinger), + 38 => Pickle::unpickle(stream).map(DnsServer::HuaweiCloud), + 39 => Pickle::unpickle(stream).map(DnsServer::Hurricane), + 40 => Pickle::unpickle(stream).map(DnsServer::IbmCloud), + 41 => Pickle::unpickle(stream).map(DnsServer::Infoblox), + 42 => Pickle::unpickle(stream).map(DnsServer::Infomaniak), + 43 => Pickle::unpickle(stream).map(DnsServer::Inwx), + 44 => Pickle::unpickle(stream).map(DnsServer::Ionos), + 45 => Pickle::unpickle(stream).map(DnsServer::Ipv64), + 46 => Pickle::unpickle(stream).map(DnsServer::Joker), + 47 => Pickle::unpickle(stream).map(DnsServer::Lightsail), + 48 => Pickle::unpickle(stream).map(DnsServer::Linode), + 49 => Pickle::unpickle(stream).map(DnsServer::LuaDns), + 50 => Pickle::unpickle(stream).map(DnsServer::MythicBeasts), + 51 => Pickle::unpickle(stream).map(DnsServer::Namecheap), + 52 => Pickle::unpickle(stream).map(DnsServer::NameDotCom), + 53 => Pickle::unpickle(stream).map(DnsServer::NameSilo), + 54 => Pickle::unpickle(stream).map(DnsServer::Netcup), + 55 => Pickle::unpickle(stream).map(DnsServer::Netlify), + 56 => Pickle::unpickle(stream).map(DnsServer::Nifcloud), + 57 => Pickle::unpickle(stream).map(DnsServer::Ns1), + 58 => Pickle::unpickle(stream).map(DnsServer::OracleCloud), + 59 => Pickle::unpickle(stream).map(DnsServer::Plesk), + 60 => Pickle::unpickle(stream).map(DnsServer::Safedns), + 61 => Pickle::unpickle(stream).map(DnsServer::Scaleway), + 62 => Pickle::unpickle(stream).map(DnsServer::TencentCloud), + 63 => Pickle::unpickle(stream).map(DnsServer::Transip), + 64 => Pickle::unpickle(stream).map(DnsServer::UltraDns), + 65 => Pickle::unpickle(stream).map(DnsServer::Vercel), + 66 => Pickle::unpickle(stream).map(DnsServer::Volcengine), + 67 => Pickle::unpickle(stream).map(DnsServer::Vultr), + 68 => Pickle::unpickle(stream).map(DnsServer::WebSupport), + 69 => Pickle::unpickle(stream).map(DnsServer::YandexCloud), _ => None, } } @@ -10346,12 +10865,10 @@ impl IntoValue for DnsServer { .insert_unchecked(Property::Type, JmapValue::Str("Tsig".into())); obj } - DnsServer::Sig0(obj) => { - let mut obj = obj.into_value(); - obj.as_object_mut() - .unwrap() - .insert_unchecked(Property::Type, JmapValue::Str("Sig0".into())); - obj + DnsServer::Deprecated1 => { + let mut obj = jmap_tools::Map::new(); + obj.insert_unchecked(Property::Type, JmapValue::Str("Deprecated1".into())); + JmapValue::Object(obj) } DnsServer::Cloudflare(obj) => { let mut obj = obj.into_value(); @@ -10423,6 +10940,412 @@ impl IntoValue for DnsServer { .insert_unchecked(Property::Type, JmapValue::Str("GoogleCloudDns".into())); obj } + DnsServer::Alidns(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Alidns".into())); + obj + } + DnsServer::ArvanCloud(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("ArvanCloud".into())); + obj + } + DnsServer::Autodns(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Autodns".into())); + obj + } + DnsServer::AzureDns(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("AzureDns".into())); + obj + } + DnsServer::BaiduCloud(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("BaiduCloud".into())); + obj + } + DnsServer::BluecatV2(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("BluecatV2".into())); + obj + } + DnsServer::ClouDns(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("ClouDns".into())); + obj + } + DnsServer::Constellix(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Constellix".into())); + obj + } + DnsServer::Cpanel(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Cpanel".into())); + obj + } + DnsServer::Ddnss(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Ddnss".into())); + obj + } + DnsServer::DnsMadeEasy(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("DnsMadeEasy".into())); + obj + } + DnsServer::Domeneshop(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Domeneshop".into())); + obj + } + DnsServer::Dreamhost(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Dreamhost".into())); + obj + } + DnsServer::DuckDns(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("DuckDns".into())); + obj + } + DnsServer::Dynu(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Dynu".into())); + obj + } + DnsServer::EasyDns(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("EasyDns".into())); + obj + } + DnsServer::EdgeDns(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("EdgeDns".into())); + obj + } + DnsServer::Exoscale(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Exoscale".into())); + obj + } + DnsServer::FreeMyIp(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("FreeMyIp".into())); + obj + } + DnsServer::GandiV5(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("GandiV5".into())); + obj + } + DnsServer::Gcore(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Gcore".into())); + obj + } + DnsServer::Glesys(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Glesys".into())); + obj + } + DnsServer::Godaddy(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Godaddy".into())); + obj + } + DnsServer::Hetzner(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Hetzner".into())); + obj + } + DnsServer::HostingDe(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("HostingDe".into())); + obj + } + DnsServer::Hostinger(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Hostinger".into())); + obj + } + DnsServer::HuaweiCloud(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("HuaweiCloud".into())); + obj + } + DnsServer::Hurricane(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Hurricane".into())); + obj + } + DnsServer::IbmCloud(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("IbmCloud".into())); + obj + } + DnsServer::Infoblox(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Infoblox".into())); + obj + } + DnsServer::Infomaniak(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Infomaniak".into())); + obj + } + DnsServer::Inwx(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Inwx".into())); + obj + } + DnsServer::Ionos(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Ionos".into())); + obj + } + DnsServer::Ipv64(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Ipv64".into())); + obj + } + DnsServer::Joker(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Joker".into())); + obj + } + DnsServer::Lightsail(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Lightsail".into())); + obj + } + DnsServer::Linode(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Linode".into())); + obj + } + DnsServer::LuaDns(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("LuaDns".into())); + obj + } + DnsServer::MythicBeasts(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("MythicBeasts".into())); + obj + } + DnsServer::Namecheap(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Namecheap".into())); + obj + } + DnsServer::NameDotCom(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("NameDotCom".into())); + obj + } + DnsServer::NameSilo(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("NameSilo".into())); + obj + } + DnsServer::Netcup(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Netcup".into())); + obj + } + DnsServer::Netlify(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Netlify".into())); + obj + } + DnsServer::Nifcloud(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Nifcloud".into())); + obj + } + DnsServer::Ns1(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Ns1".into())); + obj + } + DnsServer::OracleCloud(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("OracleCloud".into())); + obj + } + DnsServer::Plesk(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Plesk".into())); + obj + } + DnsServer::Safedns(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Safedns".into())); + obj + } + DnsServer::Scaleway(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Scaleway".into())); + obj + } + DnsServer::TencentCloud(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("TencentCloud".into())); + obj + } + DnsServer::Transip(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Transip".into())); + obj + } + DnsServer::UltraDns(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("UltraDns".into())); + obj + } + DnsServer::Vercel(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Vercel".into())); + obj + } + DnsServer::Volcengine(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Volcengine".into())); + obj + } + DnsServer::Vultr(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Vultr".into())); + obj + } + DnsServer::WebSupport(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("WebSupport".into())); + obj + } + DnsServer::YandexCloud(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("YandexCloud".into())); + obj + } } } } @@ -10436,7 +11359,7 @@ impl RegistryJsonPatch for DnsServer { if !pointer.has_next() { match object_type(&pointer, &value)? { DnsServerType::Tsig => *self = DnsServer::Tsig(Default::default()), - DnsServerType::Sig0 => *self = DnsServer::Sig0(Default::default()), + DnsServerType::Deprecated1 => *self = DnsServer::Deprecated1, DnsServerType::Cloudflare => *self = DnsServer::Cloudflare(Default::default()), DnsServerType::DigitalOcean => *self = DnsServer::DigitalOcean(Default::default()), DnsServerType::DeSEC => *self = DnsServer::DeSEC(Default::default()), @@ -10449,11 +11372,69 @@ impl RegistryJsonPatch for DnsServer { DnsServerType::GoogleCloudDns => { *self = DnsServer::GoogleCloudDns(Default::default()) } + DnsServerType::Alidns => *self = DnsServer::Alidns(Default::default()), + DnsServerType::ArvanCloud => *self = DnsServer::ArvanCloud(Default::default()), + DnsServerType::Autodns => *self = DnsServer::Autodns(Default::default()), + DnsServerType::AzureDns => *self = DnsServer::AzureDns(Default::default()), + DnsServerType::BaiduCloud => *self = DnsServer::BaiduCloud(Default::default()), + DnsServerType::BluecatV2 => *self = DnsServer::BluecatV2(Default::default()), + DnsServerType::ClouDns => *self = DnsServer::ClouDns(Default::default()), + DnsServerType::Constellix => *self = DnsServer::Constellix(Default::default()), + DnsServerType::Cpanel => *self = DnsServer::Cpanel(Default::default()), + DnsServerType::Ddnss => *self = DnsServer::Ddnss(Default::default()), + DnsServerType::DnsMadeEasy => *self = DnsServer::DnsMadeEasy(Default::default()), + DnsServerType::Domeneshop => *self = DnsServer::Domeneshop(Default::default()), + DnsServerType::Dreamhost => *self = DnsServer::Dreamhost(Default::default()), + DnsServerType::DuckDns => *self = DnsServer::DuckDns(Default::default()), + DnsServerType::Dynu => *self = DnsServer::Dynu(Default::default()), + DnsServerType::EasyDns => *self = DnsServer::EasyDns(Default::default()), + DnsServerType::EdgeDns => *self = DnsServer::EdgeDns(Default::default()), + DnsServerType::Exoscale => *self = DnsServer::Exoscale(Default::default()), + DnsServerType::FreeMyIp => *self = DnsServer::FreeMyIp(Default::default()), + DnsServerType::GandiV5 => *self = DnsServer::GandiV5(Default::default()), + DnsServerType::Gcore => *self = DnsServer::Gcore(Default::default()), + DnsServerType::Glesys => *self = DnsServer::Glesys(Default::default()), + DnsServerType::Godaddy => *self = DnsServer::Godaddy(Default::default()), + DnsServerType::Hetzner => *self = DnsServer::Hetzner(Default::default()), + DnsServerType::HostingDe => *self = DnsServer::HostingDe(Default::default()), + DnsServerType::Hostinger => *self = DnsServer::Hostinger(Default::default()), + DnsServerType::HuaweiCloud => *self = DnsServer::HuaweiCloud(Default::default()), + DnsServerType::Hurricane => *self = DnsServer::Hurricane(Default::default()), + DnsServerType::IbmCloud => *self = DnsServer::IbmCloud(Default::default()), + DnsServerType::Infoblox => *self = DnsServer::Infoblox(Default::default()), + DnsServerType::Infomaniak => *self = DnsServer::Infomaniak(Default::default()), + DnsServerType::Inwx => *self = DnsServer::Inwx(Default::default()), + DnsServerType::Ionos => *self = DnsServer::Ionos(Default::default()), + DnsServerType::Ipv64 => *self = DnsServer::Ipv64(Default::default()), + DnsServerType::Joker => *self = DnsServer::Joker(Default::default()), + DnsServerType::Lightsail => *self = DnsServer::Lightsail(Default::default()), + DnsServerType::Linode => *self = DnsServer::Linode(Default::default()), + DnsServerType::LuaDns => *self = DnsServer::LuaDns(Default::default()), + DnsServerType::MythicBeasts => *self = DnsServer::MythicBeasts(Default::default()), + DnsServerType::Namecheap => *self = DnsServer::Namecheap(Default::default()), + DnsServerType::NameDotCom => *self = DnsServer::NameDotCom(Default::default()), + DnsServerType::NameSilo => *self = DnsServer::NameSilo(Default::default()), + DnsServerType::Netcup => *self = DnsServer::Netcup(Default::default()), + DnsServerType::Netlify => *self = DnsServer::Netlify(Default::default()), + DnsServerType::Nifcloud => *self = DnsServer::Nifcloud(Default::default()), + DnsServerType::Ns1 => *self = DnsServer::Ns1(Default::default()), + DnsServerType::OracleCloud => *self = DnsServer::OracleCloud(Default::default()), + DnsServerType::Plesk => *self = DnsServer::Plesk(Default::default()), + DnsServerType::Safedns => *self = DnsServer::Safedns(Default::default()), + DnsServerType::Scaleway => *self = DnsServer::Scaleway(Default::default()), + DnsServerType::TencentCloud => *self = DnsServer::TencentCloud(Default::default()), + DnsServerType::Transip => *self = DnsServer::Transip(Default::default()), + DnsServerType::UltraDns => *self = DnsServer::UltraDns(Default::default()), + DnsServerType::Vercel => *self = DnsServer::Vercel(Default::default()), + DnsServerType::Volcengine => *self = DnsServer::Volcengine(Default::default()), + DnsServerType::Vultr => *self = DnsServer::Vultr(Default::default()), + DnsServerType::WebSupport => *self = DnsServer::WebSupport(Default::default()), + DnsServerType::YandexCloud => *self = DnsServer::YandexCloud(Default::default()), } } match self { DnsServer::Tsig(inner) => inner.patch(pointer, value), - DnsServer::Sig0(inner) => inner.patch(pointer, value), + DnsServer::Deprecated1 => pointer.assert_eof(), DnsServer::Cloudflare(inner) => inner.patch(pointer, value), DnsServer::DigitalOcean(inner) => inner.patch(pointer, value), DnsServer::DeSEC(inner) => inner.patch(pointer, value), @@ -10464,6 +11445,64 @@ impl RegistryJsonPatch for DnsServer { DnsServer::Spaceship(inner) => inner.patch(pointer, value), DnsServer::Route53(inner) => inner.patch(pointer, value), DnsServer::GoogleCloudDns(inner) => inner.patch(pointer, value), + DnsServer::Alidns(inner) => inner.patch(pointer, value), + DnsServer::ArvanCloud(inner) => inner.patch(pointer, value), + DnsServer::Autodns(inner) => inner.patch(pointer, value), + DnsServer::AzureDns(inner) => inner.patch(pointer, value), + DnsServer::BaiduCloud(inner) => inner.patch(pointer, value), + DnsServer::BluecatV2(inner) => inner.patch(pointer, value), + DnsServer::ClouDns(inner) => inner.patch(pointer, value), + DnsServer::Constellix(inner) => inner.patch(pointer, value), + DnsServer::Cpanel(inner) => inner.patch(pointer, value), + DnsServer::Ddnss(inner) => inner.patch(pointer, value), + DnsServer::DnsMadeEasy(inner) => inner.patch(pointer, value), + DnsServer::Domeneshop(inner) => inner.patch(pointer, value), + DnsServer::Dreamhost(inner) => inner.patch(pointer, value), + DnsServer::DuckDns(inner) => inner.patch(pointer, value), + DnsServer::Dynu(inner) => inner.patch(pointer, value), + DnsServer::EasyDns(inner) => inner.patch(pointer, value), + DnsServer::EdgeDns(inner) => inner.patch(pointer, value), + DnsServer::Exoscale(inner) => inner.patch(pointer, value), + DnsServer::FreeMyIp(inner) => inner.patch(pointer, value), + DnsServer::GandiV5(inner) => inner.patch(pointer, value), + DnsServer::Gcore(inner) => inner.patch(pointer, value), + DnsServer::Glesys(inner) => inner.patch(pointer, value), + DnsServer::Godaddy(inner) => inner.patch(pointer, value), + DnsServer::Hetzner(inner) => inner.patch(pointer, value), + DnsServer::HostingDe(inner) => inner.patch(pointer, value), + DnsServer::Hostinger(inner) => inner.patch(pointer, value), + DnsServer::HuaweiCloud(inner) => inner.patch(pointer, value), + DnsServer::Hurricane(inner) => inner.patch(pointer, value), + DnsServer::IbmCloud(inner) => inner.patch(pointer, value), + DnsServer::Infoblox(inner) => inner.patch(pointer, value), + DnsServer::Infomaniak(inner) => inner.patch(pointer, value), + DnsServer::Inwx(inner) => inner.patch(pointer, value), + DnsServer::Ionos(inner) => inner.patch(pointer, value), + DnsServer::Ipv64(inner) => inner.patch(pointer, value), + DnsServer::Joker(inner) => inner.patch(pointer, value), + DnsServer::Lightsail(inner) => inner.patch(pointer, value), + DnsServer::Linode(inner) => inner.patch(pointer, value), + DnsServer::LuaDns(inner) => inner.patch(pointer, value), + DnsServer::MythicBeasts(inner) => inner.patch(pointer, value), + DnsServer::Namecheap(inner) => inner.patch(pointer, value), + DnsServer::NameDotCom(inner) => inner.patch(pointer, value), + DnsServer::NameSilo(inner) => inner.patch(pointer, value), + DnsServer::Netcup(inner) => inner.patch(pointer, value), + DnsServer::Netlify(inner) => inner.patch(pointer, value), + DnsServer::Nifcloud(inner) => inner.patch(pointer, value), + DnsServer::Ns1(inner) => inner.patch(pointer, value), + DnsServer::OracleCloud(inner) => inner.patch(pointer, value), + DnsServer::Plesk(inner) => inner.patch(pointer, value), + DnsServer::Safedns(inner) => inner.patch(pointer, value), + DnsServer::Scaleway(inner) => inner.patch(pointer, value), + DnsServer::TencentCloud(inner) => inner.patch(pointer, value), + DnsServer::Transip(inner) => inner.patch(pointer, value), + DnsServer::UltraDns(inner) => inner.patch(pointer, value), + DnsServer::Vercel(inner) => inner.patch(pointer, value), + DnsServer::Volcengine(inner) => inner.patch(pointer, value), + DnsServer::Vultr(inner) => inner.patch(pointer, value), + DnsServer::WebSupport(inner) => inner.patch(pointer, value), + DnsServer::YandexCloud(inner) => inner.patch(pointer, value), } } } @@ -10472,7 +11511,7 @@ impl DnsServer { pub fn object_type(&self) -> DnsServerType { match self { DnsServer::Tsig(_) => DnsServerType::Tsig, - DnsServer::Sig0(_) => DnsServerType::Sig0, + DnsServer::Deprecated1 => DnsServerType::Deprecated1, DnsServer::Cloudflare(_) => DnsServerType::Cloudflare, DnsServer::DigitalOcean(_) => DnsServerType::DigitalOcean, DnsServer::DeSEC(_) => DnsServerType::DeSEC, @@ -10483,6 +11522,821 @@ impl DnsServer { DnsServer::Spaceship(_) => DnsServerType::Spaceship, DnsServer::Route53(_) => DnsServerType::Route53, DnsServer::GoogleCloudDns(_) => DnsServerType::GoogleCloudDns, + DnsServer::Alidns(_) => DnsServerType::Alidns, + DnsServer::ArvanCloud(_) => DnsServerType::ArvanCloud, + DnsServer::Autodns(_) => DnsServerType::Autodns, + DnsServer::AzureDns(_) => DnsServerType::AzureDns, + DnsServer::BaiduCloud(_) => DnsServerType::BaiduCloud, + DnsServer::BluecatV2(_) => DnsServerType::BluecatV2, + DnsServer::ClouDns(_) => DnsServerType::ClouDns, + DnsServer::Constellix(_) => DnsServerType::Constellix, + DnsServer::Cpanel(_) => DnsServerType::Cpanel, + DnsServer::Ddnss(_) => DnsServerType::Ddnss, + DnsServer::DnsMadeEasy(_) => DnsServerType::DnsMadeEasy, + DnsServer::Domeneshop(_) => DnsServerType::Domeneshop, + DnsServer::Dreamhost(_) => DnsServerType::Dreamhost, + DnsServer::DuckDns(_) => DnsServerType::DuckDns, + DnsServer::Dynu(_) => DnsServerType::Dynu, + DnsServer::EasyDns(_) => DnsServerType::EasyDns, + DnsServer::EdgeDns(_) => DnsServerType::EdgeDns, + DnsServer::Exoscale(_) => DnsServerType::Exoscale, + DnsServer::FreeMyIp(_) => DnsServerType::FreeMyIp, + DnsServer::GandiV5(_) => DnsServerType::GandiV5, + DnsServer::Gcore(_) => DnsServerType::Gcore, + DnsServer::Glesys(_) => DnsServerType::Glesys, + DnsServer::Godaddy(_) => DnsServerType::Godaddy, + DnsServer::Hetzner(_) => DnsServerType::Hetzner, + DnsServer::HostingDe(_) => DnsServerType::HostingDe, + DnsServer::Hostinger(_) => DnsServerType::Hostinger, + DnsServer::HuaweiCloud(_) => DnsServerType::HuaweiCloud, + DnsServer::Hurricane(_) => DnsServerType::Hurricane, + DnsServer::IbmCloud(_) => DnsServerType::IbmCloud, + DnsServer::Infoblox(_) => DnsServerType::Infoblox, + DnsServer::Infomaniak(_) => DnsServerType::Infomaniak, + DnsServer::Inwx(_) => DnsServerType::Inwx, + DnsServer::Ionos(_) => DnsServerType::Ionos, + DnsServer::Ipv64(_) => DnsServerType::Ipv64, + DnsServer::Joker(_) => DnsServerType::Joker, + DnsServer::Lightsail(_) => DnsServerType::Lightsail, + DnsServer::Linode(_) => DnsServerType::Linode, + DnsServer::LuaDns(_) => DnsServerType::LuaDns, + DnsServer::MythicBeasts(_) => DnsServerType::MythicBeasts, + DnsServer::Namecheap(_) => DnsServerType::Namecheap, + DnsServer::NameDotCom(_) => DnsServerType::NameDotCom, + DnsServer::NameSilo(_) => DnsServerType::NameSilo, + DnsServer::Netcup(_) => DnsServerType::Netcup, + DnsServer::Netlify(_) => DnsServerType::Netlify, + DnsServer::Nifcloud(_) => DnsServerType::Nifcloud, + DnsServer::Ns1(_) => DnsServerType::Ns1, + DnsServer::OracleCloud(_) => DnsServerType::OracleCloud, + DnsServer::Plesk(_) => DnsServerType::Plesk, + DnsServer::Safedns(_) => DnsServerType::Safedns, + DnsServer::Scaleway(_) => DnsServerType::Scaleway, + DnsServer::TencentCloud(_) => DnsServerType::TencentCloud, + DnsServer::Transip(_) => DnsServerType::Transip, + DnsServer::UltraDns(_) => DnsServerType::UltraDns, + DnsServer::Vercel(_) => DnsServerType::Vercel, + DnsServer::Volcengine(_) => DnsServerType::Volcengine, + DnsServer::Vultr(_) => DnsServerType::Vultr, + DnsServer::WebSupport(_) => DnsServerType::WebSupport, + DnsServer::YandexCloud(_) => DnsServerType::YandexCloud, + } + } +} + +impl DnsServerAlidns { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.access_key; + if value.is_empty() { + errors.push(ValidationError::required(Property::AccessKey)); + } + let value = &self.secret_key; + value.validate(errors); + if let Some(value) = &self.region { + if value.is_empty() { + errors.push(ValidationError::required(Property::Region)); + } + } + let value = &self.security_token; + value.validate(errors); + if let Some(value) = &self.line { + if value.is_empty() { + errors.push(ValidationError::required(Property::Line)); + } + } + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerAlidns { + fn pickle(&self, out: &mut Vec) { + self.access_key.pickle(out); + self.secret_key.pickle(out); + self.region.pickle(out); + self.security_token.pickle(out); + self.line.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.access_key = Pickle::unpickle(stream)?; + this.secret_key = Pickle::unpickle(stream)?; + this.region = Pickle::unpickle(stream)?; + this.security_token = Pickle::unpickle(stream)?; + this.line = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerAlidns { + fn default() -> Self { + Self { + access_key: Default::default(), + secret_key: Default::default(), + region: Default::default(), + security_token: Default::default(), + line: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerAlidns { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(14); + map.insert_unchecked(Property::AccessKey, self.access_key.into_value()); + map.insert_unchecked(Property::SecretKey, self.secret_key.into_value()); + map.insert_unchecked(Property::Region, self.region.into_value()); + map.insert_unchecked(Property::SecurityToken, self.security_token.into_value()); + map.insert_unchecked(Property::Line, self.line.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerAlidns { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::AccessKey) => self + .access_key + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::SecretKey) => self.secret_key.patch(pointer, value), + Some(Property::Region) => self + .region + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::SecurityToken) => self.security_token.patch(pointer, value), + Some(Property::Line) => self + .line + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerAutodns { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.username; + if value.is_empty() { + errors.push(ValidationError::required(Property::Username)); + } + let value = &self.password; + value.validate(errors); + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerAutodns { + fn pickle(&self, out: &mut Vec) { + self.username.pickle(out); + self.password.pickle(out); + self.context.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.username = Pickle::unpickle(stream)?; + this.password = Pickle::unpickle(stream)?; + this.context = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerAutodns { + fn default() -> Self { + Self { + username: Default::default(), + password: Default::default(), + context: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerAutodns { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(12); + map.insert_unchecked(Property::Username, self.username.into_value()); + map.insert_unchecked(Property::Password, self.password.into_value()); + map.insert_unchecked(Property::Context, self.context.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerAutodns { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::Username) => self + .username + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Password) => self.password.patch(pointer, value), + Some(Property::Context) => self.context.patch(pointer, value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerAzureDns { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.tenant_id; + if value.is_empty() { + errors.push(ValidationError::required(Property::TenantId)); + } + let value = &self.client_id; + if value.is_empty() { + errors.push(ValidationError::required(Property::ClientId)); + } + let value = &self.client_secret; + value.validate(errors); + let value = &self.subscription_id; + if value.is_empty() { + errors.push(ValidationError::required(Property::SubscriptionId)); + } + let value = &self.resource_group; + if value.is_empty() { + errors.push(ValidationError::required(Property::ResourceGroup)); + } + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerAzureDns { + fn pickle(&self, out: &mut Vec) { + self.tenant_id.pickle(out); + self.client_id.pickle(out); + self.client_secret.pickle(out); + self.subscription_id.pickle(out); + self.resource_group.pickle(out); + self.environment.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.tenant_id = Pickle::unpickle(stream)?; + this.client_id = Pickle::unpickle(stream)?; + this.client_secret = Pickle::unpickle(stream)?; + this.subscription_id = Pickle::unpickle(stream)?; + this.resource_group = Pickle::unpickle(stream)?; + this.environment = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerAzureDns { + fn default() -> Self { + Self { + tenant_id: Default::default(), + client_id: Default::default(), + client_secret: Default::default(), + subscription_id: Default::default(), + resource_group: Default::default(), + environment: AzureEnvironment::Public, + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerAzureDns { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(15); + map.insert_unchecked(Property::TenantId, self.tenant_id.into_value()); + map.insert_unchecked(Property::ClientId, self.client_id.into_value()); + map.insert_unchecked(Property::ClientSecret, self.client_secret.into_value()); + map.insert_unchecked(Property::SubscriptionId, self.subscription_id.into_value()); + map.insert_unchecked(Property::ResourceGroup, self.resource_group.into_value()); + map.insert_unchecked(Property::Environment, self.environment.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerAzureDns { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::TenantId) => self + .tenant_id + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::ClientId) => self + .client_id + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::ClientSecret) => self.client_secret.patch(pointer, value), + Some(Property::SubscriptionId) => self + .subscription_id + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::ResourceGroup) => self + .resource_group + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Environment) => self.environment.patch(pointer, value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerBaiduCloud { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.access_key; + if value.is_empty() { + errors.push(ValidationError::required(Property::AccessKey)); + } + let value = &self.secret_key; + value.validate(errors); + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerBaiduCloud { + fn pickle(&self, out: &mut Vec) { + self.access_key.pickle(out); + self.secret_key.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.access_key = Pickle::unpickle(stream)?; + this.secret_key = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerBaiduCloud { + fn default() -> Self { + Self { + access_key: Default::default(), + secret_key: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerBaiduCloud { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(11); + map.insert_unchecked(Property::AccessKey, self.access_key.into_value()); + map.insert_unchecked(Property::SecretKey, self.secret_key.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerBaiduCloud { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::AccessKey) => self + .access_key + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::SecretKey) => self.secret_key.patch(pointer, value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerBluecatV2 { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.base_url; + if value.is_empty() { + errors.push(ValidationError::required(Property::BaseUrl)); + } + let value = &self.username; + if value.is_empty() { + errors.push(ValidationError::required(Property::Username)); + } + let value = &self.password; + value.validate(errors); + let value = &self.config_name; + if value.is_empty() { + errors.push(ValidationError::required(Property::ConfigName)); + } + let value = &self.view_name; + if value.is_empty() { + errors.push(ValidationError::required(Property::ViewName)); + } + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerBluecatV2 { + fn pickle(&self, out: &mut Vec) { + self.base_url.pickle(out); + self.username.pickle(out); + self.password.pickle(out); + self.config_name.pickle(out); + self.view_name.pickle(out); + self.skip_deploy.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.base_url = Pickle::unpickle(stream)?; + this.username = Pickle::unpickle(stream)?; + this.password = Pickle::unpickle(stream)?; + this.config_name = Pickle::unpickle(stream)?; + this.view_name = Pickle::unpickle(stream)?; + this.skip_deploy = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerBluecatV2 { + fn default() -> Self { + Self { + base_url: Default::default(), + username: Default::default(), + password: Default::default(), + config_name: Default::default(), + view_name: Default::default(), + skip_deploy: false, + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerBluecatV2 { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(15); + map.insert_unchecked(Property::BaseUrl, self.base_url.into_value()); + map.insert_unchecked(Property::Username, self.username.into_value()); + map.insert_unchecked(Property::Password, self.password.into_value()); + map.insert_unchecked(Property::ConfigName, self.config_name.into_value()); + map.insert_unchecked(Property::ViewName, self.view_name.into_value()); + map.insert_unchecked(Property::SkipDeploy, self.skip_deploy.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerBluecatV2 { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::BaseUrl) => self + .base_url + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Username) => self + .username + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Password) => self.password.patch(pointer, value), + Some(Property::ConfigName) => self + .config_name + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::ViewName) => self + .view_name + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::SkipDeploy) => self.skip_deploy.patch(pointer, value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), } } } @@ -10492,7 +12346,7 @@ impl DnsServerBootstrap { match self { DnsServerBootstrap::Manual => true, DnsServerBootstrap::Tsig(inner) => inner.validate(errors), - DnsServerBootstrap::Sig0(inner) => inner.validate(errors), + DnsServerBootstrap::Deprecated1 => true, DnsServerBootstrap::Cloudflare(inner) => inner.validate(errors), DnsServerBootstrap::DigitalOcean(inner) => inner.validate(errors), DnsServerBootstrap::DeSEC(inner) => inner.validate(errors), @@ -10503,6 +12357,64 @@ impl DnsServerBootstrap { DnsServerBootstrap::Spaceship(inner) => inner.validate(errors), DnsServerBootstrap::Route53(inner) => inner.validate(errors), DnsServerBootstrap::GoogleCloudDns(inner) => inner.validate(errors), + DnsServerBootstrap::Alidns(inner) => inner.validate(errors), + DnsServerBootstrap::ArvanCloud(inner) => inner.validate(errors), + DnsServerBootstrap::Autodns(inner) => inner.validate(errors), + DnsServerBootstrap::AzureDns(inner) => inner.validate(errors), + DnsServerBootstrap::BaiduCloud(inner) => inner.validate(errors), + DnsServerBootstrap::BluecatV2(inner) => inner.validate(errors), + DnsServerBootstrap::ClouDns(inner) => inner.validate(errors), + DnsServerBootstrap::Constellix(inner) => inner.validate(errors), + DnsServerBootstrap::Cpanel(inner) => inner.validate(errors), + DnsServerBootstrap::Ddnss(inner) => inner.validate(errors), + DnsServerBootstrap::DnsMadeEasy(inner) => inner.validate(errors), + DnsServerBootstrap::Domeneshop(inner) => inner.validate(errors), + DnsServerBootstrap::Dreamhost(inner) => inner.validate(errors), + DnsServerBootstrap::DuckDns(inner) => inner.validate(errors), + DnsServerBootstrap::Dynu(inner) => inner.validate(errors), + DnsServerBootstrap::EasyDns(inner) => inner.validate(errors), + DnsServerBootstrap::EdgeDns(inner) => inner.validate(errors), + DnsServerBootstrap::Exoscale(inner) => inner.validate(errors), + DnsServerBootstrap::FreeMyIp(inner) => inner.validate(errors), + DnsServerBootstrap::GandiV5(inner) => inner.validate(errors), + DnsServerBootstrap::Gcore(inner) => inner.validate(errors), + DnsServerBootstrap::Glesys(inner) => inner.validate(errors), + DnsServerBootstrap::Godaddy(inner) => inner.validate(errors), + DnsServerBootstrap::Hetzner(inner) => inner.validate(errors), + DnsServerBootstrap::HostingDe(inner) => inner.validate(errors), + DnsServerBootstrap::Hostinger(inner) => inner.validate(errors), + DnsServerBootstrap::HuaweiCloud(inner) => inner.validate(errors), + DnsServerBootstrap::Hurricane(inner) => inner.validate(errors), + DnsServerBootstrap::IbmCloud(inner) => inner.validate(errors), + DnsServerBootstrap::Infoblox(inner) => inner.validate(errors), + DnsServerBootstrap::Infomaniak(inner) => inner.validate(errors), + DnsServerBootstrap::Inwx(inner) => inner.validate(errors), + DnsServerBootstrap::Ionos(inner) => inner.validate(errors), + DnsServerBootstrap::Ipv64(inner) => inner.validate(errors), + DnsServerBootstrap::Joker(inner) => inner.validate(errors), + DnsServerBootstrap::Lightsail(inner) => inner.validate(errors), + DnsServerBootstrap::Linode(inner) => inner.validate(errors), + DnsServerBootstrap::LuaDns(inner) => inner.validate(errors), + DnsServerBootstrap::MythicBeasts(inner) => inner.validate(errors), + DnsServerBootstrap::Namecheap(inner) => inner.validate(errors), + DnsServerBootstrap::NameDotCom(inner) => inner.validate(errors), + DnsServerBootstrap::NameSilo(inner) => inner.validate(errors), + DnsServerBootstrap::Netcup(inner) => inner.validate(errors), + DnsServerBootstrap::Netlify(inner) => inner.validate(errors), + DnsServerBootstrap::Nifcloud(inner) => inner.validate(errors), + DnsServerBootstrap::Ns1(inner) => inner.validate(errors), + DnsServerBootstrap::OracleCloud(inner) => inner.validate(errors), + DnsServerBootstrap::Plesk(inner) => inner.validate(errors), + DnsServerBootstrap::Safedns(inner) => inner.validate(errors), + DnsServerBootstrap::Scaleway(inner) => inner.validate(errors), + DnsServerBootstrap::TencentCloud(inner) => inner.validate(errors), + DnsServerBootstrap::Transip(inner) => inner.validate(errors), + DnsServerBootstrap::UltraDns(inner) => inner.validate(errors), + DnsServerBootstrap::Vercel(inner) => inner.validate(errors), + DnsServerBootstrap::Volcengine(inner) => inner.validate(errors), + DnsServerBootstrap::Vultr(inner) => inner.validate(errors), + DnsServerBootstrap::WebSupport(inner) => inner.validate(errors), + DnsServerBootstrap::YandexCloud(inner) => inner.validate(errors), } } } @@ -10523,9 +12435,8 @@ impl Pickle for DnsServerBootstrap { 1u16.pickle(out); inner.pickle(out); } - DnsServerBootstrap::Sig0(inner) => { + DnsServerBootstrap::Deprecated1 => { 2u16.pickle(out); - inner.pickle(out); } DnsServerBootstrap::Cloudflare(inner) => { 3u16.pickle(out); @@ -10567,6 +12478,238 @@ impl Pickle for DnsServerBootstrap { 12u16.pickle(out); inner.pickle(out); } + DnsServerBootstrap::Alidns(inner) => { + 13u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::ArvanCloud(inner) => { + 14u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Autodns(inner) => { + 15u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::AzureDns(inner) => { + 16u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::BaiduCloud(inner) => { + 17u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::BluecatV2(inner) => { + 18u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::ClouDns(inner) => { + 19u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Constellix(inner) => { + 20u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Cpanel(inner) => { + 21u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Ddnss(inner) => { + 22u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::DnsMadeEasy(inner) => { + 23u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Domeneshop(inner) => { + 24u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Dreamhost(inner) => { + 25u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::DuckDns(inner) => { + 26u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Dynu(inner) => { + 27u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::EasyDns(inner) => { + 28u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::EdgeDns(inner) => { + 29u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Exoscale(inner) => { + 30u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::FreeMyIp(inner) => { + 31u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::GandiV5(inner) => { + 32u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Gcore(inner) => { + 33u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Glesys(inner) => { + 34u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Godaddy(inner) => { + 35u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Hetzner(inner) => { + 36u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::HostingDe(inner) => { + 37u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Hostinger(inner) => { + 38u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::HuaweiCloud(inner) => { + 39u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Hurricane(inner) => { + 40u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::IbmCloud(inner) => { + 41u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Infoblox(inner) => { + 42u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Infomaniak(inner) => { + 43u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Inwx(inner) => { + 44u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Ionos(inner) => { + 45u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Ipv64(inner) => { + 46u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Joker(inner) => { + 47u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Lightsail(inner) => { + 48u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Linode(inner) => { + 49u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::LuaDns(inner) => { + 50u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::MythicBeasts(inner) => { + 51u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Namecheap(inner) => { + 52u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::NameDotCom(inner) => { + 53u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::NameSilo(inner) => { + 54u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Netcup(inner) => { + 55u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Netlify(inner) => { + 56u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Nifcloud(inner) => { + 57u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Ns1(inner) => { + 58u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::OracleCloud(inner) => { + 59u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Plesk(inner) => { + 60u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Safedns(inner) => { + 61u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Scaleway(inner) => { + 62u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::TencentCloud(inner) => { + 63u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Transip(inner) => { + 64u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::UltraDns(inner) => { + 65u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Vercel(inner) => { + 66u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Volcengine(inner) => { + 67u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::Vultr(inner) => { + 68u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::WebSupport(inner) => { + 69u16.pickle(out); + inner.pickle(out); + } + DnsServerBootstrap::YandexCloud(inner) => { + 70u16.pickle(out); + inner.pickle(out); + } } } @@ -10574,7 +12717,7 @@ impl Pickle for DnsServerBootstrap { match u16::unpickle(stream)? { 0 => Some(DnsServerBootstrap::Manual), 1 => Pickle::unpickle(stream).map(DnsServerBootstrap::Tsig), - 2 => Pickle::unpickle(stream).map(DnsServerBootstrap::Sig0), + 2 => Some(DnsServerBootstrap::Deprecated1), 3 => Pickle::unpickle(stream).map(DnsServerBootstrap::Cloudflare), 4 => Pickle::unpickle(stream).map(DnsServerBootstrap::DigitalOcean), 5 => Pickle::unpickle(stream).map(DnsServerBootstrap::DeSEC), @@ -10585,6 +12728,64 @@ impl Pickle for DnsServerBootstrap { 10 => Pickle::unpickle(stream).map(DnsServerBootstrap::Spaceship), 11 => Pickle::unpickle(stream).map(DnsServerBootstrap::Route53), 12 => Pickle::unpickle(stream).map(DnsServerBootstrap::GoogleCloudDns), + 13 => Pickle::unpickle(stream).map(DnsServerBootstrap::Alidns), + 14 => Pickle::unpickle(stream).map(DnsServerBootstrap::ArvanCloud), + 15 => Pickle::unpickle(stream).map(DnsServerBootstrap::Autodns), + 16 => Pickle::unpickle(stream).map(DnsServerBootstrap::AzureDns), + 17 => Pickle::unpickle(stream).map(DnsServerBootstrap::BaiduCloud), + 18 => Pickle::unpickle(stream).map(DnsServerBootstrap::BluecatV2), + 19 => Pickle::unpickle(stream).map(DnsServerBootstrap::ClouDns), + 20 => Pickle::unpickle(stream).map(DnsServerBootstrap::Constellix), + 21 => Pickle::unpickle(stream).map(DnsServerBootstrap::Cpanel), + 22 => Pickle::unpickle(stream).map(DnsServerBootstrap::Ddnss), + 23 => Pickle::unpickle(stream).map(DnsServerBootstrap::DnsMadeEasy), + 24 => Pickle::unpickle(stream).map(DnsServerBootstrap::Domeneshop), + 25 => Pickle::unpickle(stream).map(DnsServerBootstrap::Dreamhost), + 26 => Pickle::unpickle(stream).map(DnsServerBootstrap::DuckDns), + 27 => Pickle::unpickle(stream).map(DnsServerBootstrap::Dynu), + 28 => Pickle::unpickle(stream).map(DnsServerBootstrap::EasyDns), + 29 => Pickle::unpickle(stream).map(DnsServerBootstrap::EdgeDns), + 30 => Pickle::unpickle(stream).map(DnsServerBootstrap::Exoscale), + 31 => Pickle::unpickle(stream).map(DnsServerBootstrap::FreeMyIp), + 32 => Pickle::unpickle(stream).map(DnsServerBootstrap::GandiV5), + 33 => Pickle::unpickle(stream).map(DnsServerBootstrap::Gcore), + 34 => Pickle::unpickle(stream).map(DnsServerBootstrap::Glesys), + 35 => Pickle::unpickle(stream).map(DnsServerBootstrap::Godaddy), + 36 => Pickle::unpickle(stream).map(DnsServerBootstrap::Hetzner), + 37 => Pickle::unpickle(stream).map(DnsServerBootstrap::HostingDe), + 38 => Pickle::unpickle(stream).map(DnsServerBootstrap::Hostinger), + 39 => Pickle::unpickle(stream).map(DnsServerBootstrap::HuaweiCloud), + 40 => Pickle::unpickle(stream).map(DnsServerBootstrap::Hurricane), + 41 => Pickle::unpickle(stream).map(DnsServerBootstrap::IbmCloud), + 42 => Pickle::unpickle(stream).map(DnsServerBootstrap::Infoblox), + 43 => Pickle::unpickle(stream).map(DnsServerBootstrap::Infomaniak), + 44 => Pickle::unpickle(stream).map(DnsServerBootstrap::Inwx), + 45 => Pickle::unpickle(stream).map(DnsServerBootstrap::Ionos), + 46 => Pickle::unpickle(stream).map(DnsServerBootstrap::Ipv64), + 47 => Pickle::unpickle(stream).map(DnsServerBootstrap::Joker), + 48 => Pickle::unpickle(stream).map(DnsServerBootstrap::Lightsail), + 49 => Pickle::unpickle(stream).map(DnsServerBootstrap::Linode), + 50 => Pickle::unpickle(stream).map(DnsServerBootstrap::LuaDns), + 51 => Pickle::unpickle(stream).map(DnsServerBootstrap::MythicBeasts), + 52 => Pickle::unpickle(stream).map(DnsServerBootstrap::Namecheap), + 53 => Pickle::unpickle(stream).map(DnsServerBootstrap::NameDotCom), + 54 => Pickle::unpickle(stream).map(DnsServerBootstrap::NameSilo), + 55 => Pickle::unpickle(stream).map(DnsServerBootstrap::Netcup), + 56 => Pickle::unpickle(stream).map(DnsServerBootstrap::Netlify), + 57 => Pickle::unpickle(stream).map(DnsServerBootstrap::Nifcloud), + 58 => Pickle::unpickle(stream).map(DnsServerBootstrap::Ns1), + 59 => Pickle::unpickle(stream).map(DnsServerBootstrap::OracleCloud), + 60 => Pickle::unpickle(stream).map(DnsServerBootstrap::Plesk), + 61 => Pickle::unpickle(stream).map(DnsServerBootstrap::Safedns), + 62 => Pickle::unpickle(stream).map(DnsServerBootstrap::Scaleway), + 63 => Pickle::unpickle(stream).map(DnsServerBootstrap::TencentCloud), + 64 => Pickle::unpickle(stream).map(DnsServerBootstrap::Transip), + 65 => Pickle::unpickle(stream).map(DnsServerBootstrap::UltraDns), + 66 => Pickle::unpickle(stream).map(DnsServerBootstrap::Vercel), + 67 => Pickle::unpickle(stream).map(DnsServerBootstrap::Volcengine), + 68 => Pickle::unpickle(stream).map(DnsServerBootstrap::Vultr), + 69 => Pickle::unpickle(stream).map(DnsServerBootstrap::WebSupport), + 70 => Pickle::unpickle(stream).map(DnsServerBootstrap::YandexCloud), _ => None, } } @@ -10605,12 +12806,10 @@ impl IntoValue for DnsServerBootstrap { .insert_unchecked(Property::Type, JmapValue::Str("Tsig".into())); obj } - DnsServerBootstrap::Sig0(obj) => { - let mut obj = obj.into_value(); - obj.as_object_mut() - .unwrap() - .insert_unchecked(Property::Type, JmapValue::Str("Sig0".into())); - obj + DnsServerBootstrap::Deprecated1 => { + let mut obj = jmap_tools::Map::new(); + obj.insert_unchecked(Property::Type, JmapValue::Str("Deprecated1".into())); + JmapValue::Object(obj) } DnsServerBootstrap::Cloudflare(obj) => { let mut obj = obj.into_value(); @@ -10682,6 +12881,412 @@ impl IntoValue for DnsServerBootstrap { .insert_unchecked(Property::Type, JmapValue::Str("GoogleCloudDns".into())); obj } + DnsServerBootstrap::Alidns(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Alidns".into())); + obj + } + DnsServerBootstrap::ArvanCloud(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("ArvanCloud".into())); + obj + } + DnsServerBootstrap::Autodns(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Autodns".into())); + obj + } + DnsServerBootstrap::AzureDns(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("AzureDns".into())); + obj + } + DnsServerBootstrap::BaiduCloud(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("BaiduCloud".into())); + obj + } + DnsServerBootstrap::BluecatV2(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("BluecatV2".into())); + obj + } + DnsServerBootstrap::ClouDns(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("ClouDns".into())); + obj + } + DnsServerBootstrap::Constellix(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Constellix".into())); + obj + } + DnsServerBootstrap::Cpanel(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Cpanel".into())); + obj + } + DnsServerBootstrap::Ddnss(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Ddnss".into())); + obj + } + DnsServerBootstrap::DnsMadeEasy(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("DnsMadeEasy".into())); + obj + } + DnsServerBootstrap::Domeneshop(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Domeneshop".into())); + obj + } + DnsServerBootstrap::Dreamhost(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Dreamhost".into())); + obj + } + DnsServerBootstrap::DuckDns(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("DuckDns".into())); + obj + } + DnsServerBootstrap::Dynu(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Dynu".into())); + obj + } + DnsServerBootstrap::EasyDns(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("EasyDns".into())); + obj + } + DnsServerBootstrap::EdgeDns(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("EdgeDns".into())); + obj + } + DnsServerBootstrap::Exoscale(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Exoscale".into())); + obj + } + DnsServerBootstrap::FreeMyIp(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("FreeMyIp".into())); + obj + } + DnsServerBootstrap::GandiV5(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("GandiV5".into())); + obj + } + DnsServerBootstrap::Gcore(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Gcore".into())); + obj + } + DnsServerBootstrap::Glesys(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Glesys".into())); + obj + } + DnsServerBootstrap::Godaddy(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Godaddy".into())); + obj + } + DnsServerBootstrap::Hetzner(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Hetzner".into())); + obj + } + DnsServerBootstrap::HostingDe(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("HostingDe".into())); + obj + } + DnsServerBootstrap::Hostinger(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Hostinger".into())); + obj + } + DnsServerBootstrap::HuaweiCloud(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("HuaweiCloud".into())); + obj + } + DnsServerBootstrap::Hurricane(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Hurricane".into())); + obj + } + DnsServerBootstrap::IbmCloud(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("IbmCloud".into())); + obj + } + DnsServerBootstrap::Infoblox(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Infoblox".into())); + obj + } + DnsServerBootstrap::Infomaniak(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Infomaniak".into())); + obj + } + DnsServerBootstrap::Inwx(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Inwx".into())); + obj + } + DnsServerBootstrap::Ionos(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Ionos".into())); + obj + } + DnsServerBootstrap::Ipv64(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Ipv64".into())); + obj + } + DnsServerBootstrap::Joker(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Joker".into())); + obj + } + DnsServerBootstrap::Lightsail(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Lightsail".into())); + obj + } + DnsServerBootstrap::Linode(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Linode".into())); + obj + } + DnsServerBootstrap::LuaDns(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("LuaDns".into())); + obj + } + DnsServerBootstrap::MythicBeasts(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("MythicBeasts".into())); + obj + } + DnsServerBootstrap::Namecheap(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Namecheap".into())); + obj + } + DnsServerBootstrap::NameDotCom(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("NameDotCom".into())); + obj + } + DnsServerBootstrap::NameSilo(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("NameSilo".into())); + obj + } + DnsServerBootstrap::Netcup(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Netcup".into())); + obj + } + DnsServerBootstrap::Netlify(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Netlify".into())); + obj + } + DnsServerBootstrap::Nifcloud(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Nifcloud".into())); + obj + } + DnsServerBootstrap::Ns1(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Ns1".into())); + obj + } + DnsServerBootstrap::OracleCloud(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("OracleCloud".into())); + obj + } + DnsServerBootstrap::Plesk(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Plesk".into())); + obj + } + DnsServerBootstrap::Safedns(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Safedns".into())); + obj + } + DnsServerBootstrap::Scaleway(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Scaleway".into())); + obj + } + DnsServerBootstrap::TencentCloud(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("TencentCloud".into())); + obj + } + DnsServerBootstrap::Transip(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Transip".into())); + obj + } + DnsServerBootstrap::UltraDns(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("UltraDns".into())); + obj + } + DnsServerBootstrap::Vercel(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Vercel".into())); + obj + } + DnsServerBootstrap::Volcengine(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Volcengine".into())); + obj + } + DnsServerBootstrap::Vultr(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("Vultr".into())); + obj + } + DnsServerBootstrap::WebSupport(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("WebSupport".into())); + obj + } + DnsServerBootstrap::YandexCloud(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("YandexCloud".into())); + obj + } } } } @@ -10698,9 +13303,7 @@ impl RegistryJsonPatch for DnsServerBootstrap { DnsServerBootstrapType::Tsig => { *self = DnsServerBootstrap::Tsig(Default::default()) } - DnsServerBootstrapType::Sig0 => { - *self = DnsServerBootstrap::Sig0(Default::default()) - } + DnsServerBootstrapType::Deprecated1 => *self = DnsServerBootstrap::Deprecated1, DnsServerBootstrapType::Cloudflare => { *self = DnsServerBootstrap::Cloudflare(Default::default()) } @@ -10729,12 +13332,184 @@ impl RegistryJsonPatch for DnsServerBootstrap { DnsServerBootstrapType::GoogleCloudDns => { *self = DnsServerBootstrap::GoogleCloudDns(Default::default()) } + DnsServerBootstrapType::Alidns => { + *self = DnsServerBootstrap::Alidns(Default::default()) + } + DnsServerBootstrapType::ArvanCloud => { + *self = DnsServerBootstrap::ArvanCloud(Default::default()) + } + DnsServerBootstrapType::Autodns => { + *self = DnsServerBootstrap::Autodns(Default::default()) + } + DnsServerBootstrapType::AzureDns => { + *self = DnsServerBootstrap::AzureDns(Default::default()) + } + DnsServerBootstrapType::BaiduCloud => { + *self = DnsServerBootstrap::BaiduCloud(Default::default()) + } + DnsServerBootstrapType::BluecatV2 => { + *self = DnsServerBootstrap::BluecatV2(Default::default()) + } + DnsServerBootstrapType::ClouDns => { + *self = DnsServerBootstrap::ClouDns(Default::default()) + } + DnsServerBootstrapType::Constellix => { + *self = DnsServerBootstrap::Constellix(Default::default()) + } + DnsServerBootstrapType::Cpanel => { + *self = DnsServerBootstrap::Cpanel(Default::default()) + } + DnsServerBootstrapType::Ddnss => { + *self = DnsServerBootstrap::Ddnss(Default::default()) + } + DnsServerBootstrapType::DnsMadeEasy => { + *self = DnsServerBootstrap::DnsMadeEasy(Default::default()) + } + DnsServerBootstrapType::Domeneshop => { + *self = DnsServerBootstrap::Domeneshop(Default::default()) + } + DnsServerBootstrapType::Dreamhost => { + *self = DnsServerBootstrap::Dreamhost(Default::default()) + } + DnsServerBootstrapType::DuckDns => { + *self = DnsServerBootstrap::DuckDns(Default::default()) + } + DnsServerBootstrapType::Dynu => { + *self = DnsServerBootstrap::Dynu(Default::default()) + } + DnsServerBootstrapType::EasyDns => { + *self = DnsServerBootstrap::EasyDns(Default::default()) + } + DnsServerBootstrapType::EdgeDns => { + *self = DnsServerBootstrap::EdgeDns(Default::default()) + } + DnsServerBootstrapType::Exoscale => { + *self = DnsServerBootstrap::Exoscale(Default::default()) + } + DnsServerBootstrapType::FreeMyIp => { + *self = DnsServerBootstrap::FreeMyIp(Default::default()) + } + DnsServerBootstrapType::GandiV5 => { + *self = DnsServerBootstrap::GandiV5(Default::default()) + } + DnsServerBootstrapType::Gcore => { + *self = DnsServerBootstrap::Gcore(Default::default()) + } + DnsServerBootstrapType::Glesys => { + *self = DnsServerBootstrap::Glesys(Default::default()) + } + DnsServerBootstrapType::Godaddy => { + *self = DnsServerBootstrap::Godaddy(Default::default()) + } + DnsServerBootstrapType::Hetzner => { + *self = DnsServerBootstrap::Hetzner(Default::default()) + } + DnsServerBootstrapType::HostingDe => { + *self = DnsServerBootstrap::HostingDe(Default::default()) + } + DnsServerBootstrapType::Hostinger => { + *self = DnsServerBootstrap::Hostinger(Default::default()) + } + DnsServerBootstrapType::HuaweiCloud => { + *self = DnsServerBootstrap::HuaweiCloud(Default::default()) + } + DnsServerBootstrapType::Hurricane => { + *self = DnsServerBootstrap::Hurricane(Default::default()) + } + DnsServerBootstrapType::IbmCloud => { + *self = DnsServerBootstrap::IbmCloud(Default::default()) + } + DnsServerBootstrapType::Infoblox => { + *self = DnsServerBootstrap::Infoblox(Default::default()) + } + DnsServerBootstrapType::Infomaniak => { + *self = DnsServerBootstrap::Infomaniak(Default::default()) + } + DnsServerBootstrapType::Inwx => { + *self = DnsServerBootstrap::Inwx(Default::default()) + } + DnsServerBootstrapType::Ionos => { + *self = DnsServerBootstrap::Ionos(Default::default()) + } + DnsServerBootstrapType::Ipv64 => { + *self = DnsServerBootstrap::Ipv64(Default::default()) + } + DnsServerBootstrapType::Joker => { + *self = DnsServerBootstrap::Joker(Default::default()) + } + DnsServerBootstrapType::Lightsail => { + *self = DnsServerBootstrap::Lightsail(Default::default()) + } + DnsServerBootstrapType::Linode => { + *self = DnsServerBootstrap::Linode(Default::default()) + } + DnsServerBootstrapType::LuaDns => { + *self = DnsServerBootstrap::LuaDns(Default::default()) + } + DnsServerBootstrapType::MythicBeasts => { + *self = DnsServerBootstrap::MythicBeasts(Default::default()) + } + DnsServerBootstrapType::Namecheap => { + *self = DnsServerBootstrap::Namecheap(Default::default()) + } + DnsServerBootstrapType::NameDotCom => { + *self = DnsServerBootstrap::NameDotCom(Default::default()) + } + DnsServerBootstrapType::NameSilo => { + *self = DnsServerBootstrap::NameSilo(Default::default()) + } + DnsServerBootstrapType::Netcup => { + *self = DnsServerBootstrap::Netcup(Default::default()) + } + DnsServerBootstrapType::Netlify => { + *self = DnsServerBootstrap::Netlify(Default::default()) + } + DnsServerBootstrapType::Nifcloud => { + *self = DnsServerBootstrap::Nifcloud(Default::default()) + } + DnsServerBootstrapType::Ns1 => *self = DnsServerBootstrap::Ns1(Default::default()), + DnsServerBootstrapType::OracleCloud => { + *self = DnsServerBootstrap::OracleCloud(Default::default()) + } + DnsServerBootstrapType::Plesk => { + *self = DnsServerBootstrap::Plesk(Default::default()) + } + DnsServerBootstrapType::Safedns => { + *self = DnsServerBootstrap::Safedns(Default::default()) + } + DnsServerBootstrapType::Scaleway => { + *self = DnsServerBootstrap::Scaleway(Default::default()) + } + DnsServerBootstrapType::TencentCloud => { + *self = DnsServerBootstrap::TencentCloud(Default::default()) + } + DnsServerBootstrapType::Transip => { + *self = DnsServerBootstrap::Transip(Default::default()) + } + DnsServerBootstrapType::UltraDns => { + *self = DnsServerBootstrap::UltraDns(Default::default()) + } + DnsServerBootstrapType::Vercel => { + *self = DnsServerBootstrap::Vercel(Default::default()) + } + DnsServerBootstrapType::Volcengine => { + *self = DnsServerBootstrap::Volcengine(Default::default()) + } + DnsServerBootstrapType::Vultr => { + *self = DnsServerBootstrap::Vultr(Default::default()) + } + DnsServerBootstrapType::WebSupport => { + *self = DnsServerBootstrap::WebSupport(Default::default()) + } + DnsServerBootstrapType::YandexCloud => { + *self = DnsServerBootstrap::YandexCloud(Default::default()) + } } } match self { DnsServerBootstrap::Manual => pointer.assert_eof(), DnsServerBootstrap::Tsig(inner) => inner.patch(pointer, value), - DnsServerBootstrap::Sig0(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Deprecated1 => pointer.assert_eof(), DnsServerBootstrap::Cloudflare(inner) => inner.patch(pointer, value), DnsServerBootstrap::DigitalOcean(inner) => inner.patch(pointer, value), DnsServerBootstrap::DeSEC(inner) => inner.patch(pointer, value), @@ -10745,6 +13520,64 @@ impl RegistryJsonPatch for DnsServerBootstrap { DnsServerBootstrap::Spaceship(inner) => inner.patch(pointer, value), DnsServerBootstrap::Route53(inner) => inner.patch(pointer, value), DnsServerBootstrap::GoogleCloudDns(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Alidns(inner) => inner.patch(pointer, value), + DnsServerBootstrap::ArvanCloud(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Autodns(inner) => inner.patch(pointer, value), + DnsServerBootstrap::AzureDns(inner) => inner.patch(pointer, value), + DnsServerBootstrap::BaiduCloud(inner) => inner.patch(pointer, value), + DnsServerBootstrap::BluecatV2(inner) => inner.patch(pointer, value), + DnsServerBootstrap::ClouDns(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Constellix(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Cpanel(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Ddnss(inner) => inner.patch(pointer, value), + DnsServerBootstrap::DnsMadeEasy(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Domeneshop(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Dreamhost(inner) => inner.patch(pointer, value), + DnsServerBootstrap::DuckDns(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Dynu(inner) => inner.patch(pointer, value), + DnsServerBootstrap::EasyDns(inner) => inner.patch(pointer, value), + DnsServerBootstrap::EdgeDns(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Exoscale(inner) => inner.patch(pointer, value), + DnsServerBootstrap::FreeMyIp(inner) => inner.patch(pointer, value), + DnsServerBootstrap::GandiV5(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Gcore(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Glesys(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Godaddy(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Hetzner(inner) => inner.patch(pointer, value), + DnsServerBootstrap::HostingDe(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Hostinger(inner) => inner.patch(pointer, value), + DnsServerBootstrap::HuaweiCloud(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Hurricane(inner) => inner.patch(pointer, value), + DnsServerBootstrap::IbmCloud(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Infoblox(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Infomaniak(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Inwx(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Ionos(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Ipv64(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Joker(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Lightsail(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Linode(inner) => inner.patch(pointer, value), + DnsServerBootstrap::LuaDns(inner) => inner.patch(pointer, value), + DnsServerBootstrap::MythicBeasts(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Namecheap(inner) => inner.patch(pointer, value), + DnsServerBootstrap::NameDotCom(inner) => inner.patch(pointer, value), + DnsServerBootstrap::NameSilo(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Netcup(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Netlify(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Nifcloud(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Ns1(inner) => inner.patch(pointer, value), + DnsServerBootstrap::OracleCloud(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Plesk(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Safedns(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Scaleway(inner) => inner.patch(pointer, value), + DnsServerBootstrap::TencentCloud(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Transip(inner) => inner.patch(pointer, value), + DnsServerBootstrap::UltraDns(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Vercel(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Volcengine(inner) => inner.patch(pointer, value), + DnsServerBootstrap::Vultr(inner) => inner.patch(pointer, value), + DnsServerBootstrap::WebSupport(inner) => inner.patch(pointer, value), + DnsServerBootstrap::YandexCloud(inner) => inner.patch(pointer, value), } } } @@ -10754,7 +13587,7 @@ impl DnsServerBootstrap { match self { DnsServerBootstrap::Manual => DnsServerBootstrapType::Manual, DnsServerBootstrap::Tsig(_) => DnsServerBootstrapType::Tsig, - DnsServerBootstrap::Sig0(_) => DnsServerBootstrapType::Sig0, + DnsServerBootstrap::Deprecated1 => DnsServerBootstrapType::Deprecated1, DnsServerBootstrap::Cloudflare(_) => DnsServerBootstrapType::Cloudflare, DnsServerBootstrap::DigitalOcean(_) => DnsServerBootstrapType::DigitalOcean, DnsServerBootstrap::DeSEC(_) => DnsServerBootstrapType::DeSEC, @@ -10765,6 +13598,206 @@ impl DnsServerBootstrap { DnsServerBootstrap::Spaceship(_) => DnsServerBootstrapType::Spaceship, DnsServerBootstrap::Route53(_) => DnsServerBootstrapType::Route53, DnsServerBootstrap::GoogleCloudDns(_) => DnsServerBootstrapType::GoogleCloudDns, + DnsServerBootstrap::Alidns(_) => DnsServerBootstrapType::Alidns, + DnsServerBootstrap::ArvanCloud(_) => DnsServerBootstrapType::ArvanCloud, + DnsServerBootstrap::Autodns(_) => DnsServerBootstrapType::Autodns, + DnsServerBootstrap::AzureDns(_) => DnsServerBootstrapType::AzureDns, + DnsServerBootstrap::BaiduCloud(_) => DnsServerBootstrapType::BaiduCloud, + DnsServerBootstrap::BluecatV2(_) => DnsServerBootstrapType::BluecatV2, + DnsServerBootstrap::ClouDns(_) => DnsServerBootstrapType::ClouDns, + DnsServerBootstrap::Constellix(_) => DnsServerBootstrapType::Constellix, + DnsServerBootstrap::Cpanel(_) => DnsServerBootstrapType::Cpanel, + DnsServerBootstrap::Ddnss(_) => DnsServerBootstrapType::Ddnss, + DnsServerBootstrap::DnsMadeEasy(_) => DnsServerBootstrapType::DnsMadeEasy, + DnsServerBootstrap::Domeneshop(_) => DnsServerBootstrapType::Domeneshop, + DnsServerBootstrap::Dreamhost(_) => DnsServerBootstrapType::Dreamhost, + DnsServerBootstrap::DuckDns(_) => DnsServerBootstrapType::DuckDns, + DnsServerBootstrap::Dynu(_) => DnsServerBootstrapType::Dynu, + DnsServerBootstrap::EasyDns(_) => DnsServerBootstrapType::EasyDns, + DnsServerBootstrap::EdgeDns(_) => DnsServerBootstrapType::EdgeDns, + DnsServerBootstrap::Exoscale(_) => DnsServerBootstrapType::Exoscale, + DnsServerBootstrap::FreeMyIp(_) => DnsServerBootstrapType::FreeMyIp, + DnsServerBootstrap::GandiV5(_) => DnsServerBootstrapType::GandiV5, + DnsServerBootstrap::Gcore(_) => DnsServerBootstrapType::Gcore, + DnsServerBootstrap::Glesys(_) => DnsServerBootstrapType::Glesys, + DnsServerBootstrap::Godaddy(_) => DnsServerBootstrapType::Godaddy, + DnsServerBootstrap::Hetzner(_) => DnsServerBootstrapType::Hetzner, + DnsServerBootstrap::HostingDe(_) => DnsServerBootstrapType::HostingDe, + DnsServerBootstrap::Hostinger(_) => DnsServerBootstrapType::Hostinger, + DnsServerBootstrap::HuaweiCloud(_) => DnsServerBootstrapType::HuaweiCloud, + DnsServerBootstrap::Hurricane(_) => DnsServerBootstrapType::Hurricane, + DnsServerBootstrap::IbmCloud(_) => DnsServerBootstrapType::IbmCloud, + DnsServerBootstrap::Infoblox(_) => DnsServerBootstrapType::Infoblox, + DnsServerBootstrap::Infomaniak(_) => DnsServerBootstrapType::Infomaniak, + DnsServerBootstrap::Inwx(_) => DnsServerBootstrapType::Inwx, + DnsServerBootstrap::Ionos(_) => DnsServerBootstrapType::Ionos, + DnsServerBootstrap::Ipv64(_) => DnsServerBootstrapType::Ipv64, + DnsServerBootstrap::Joker(_) => DnsServerBootstrapType::Joker, + DnsServerBootstrap::Lightsail(_) => DnsServerBootstrapType::Lightsail, + DnsServerBootstrap::Linode(_) => DnsServerBootstrapType::Linode, + DnsServerBootstrap::LuaDns(_) => DnsServerBootstrapType::LuaDns, + DnsServerBootstrap::MythicBeasts(_) => DnsServerBootstrapType::MythicBeasts, + DnsServerBootstrap::Namecheap(_) => DnsServerBootstrapType::Namecheap, + DnsServerBootstrap::NameDotCom(_) => DnsServerBootstrapType::NameDotCom, + DnsServerBootstrap::NameSilo(_) => DnsServerBootstrapType::NameSilo, + DnsServerBootstrap::Netcup(_) => DnsServerBootstrapType::Netcup, + DnsServerBootstrap::Netlify(_) => DnsServerBootstrapType::Netlify, + DnsServerBootstrap::Nifcloud(_) => DnsServerBootstrapType::Nifcloud, + DnsServerBootstrap::Ns1(_) => DnsServerBootstrapType::Ns1, + DnsServerBootstrap::OracleCloud(_) => DnsServerBootstrapType::OracleCloud, + DnsServerBootstrap::Plesk(_) => DnsServerBootstrapType::Plesk, + DnsServerBootstrap::Safedns(_) => DnsServerBootstrapType::Safedns, + DnsServerBootstrap::Scaleway(_) => DnsServerBootstrapType::Scaleway, + DnsServerBootstrap::TencentCloud(_) => DnsServerBootstrapType::TencentCloud, + DnsServerBootstrap::Transip(_) => DnsServerBootstrapType::Transip, + DnsServerBootstrap::UltraDns(_) => DnsServerBootstrapType::UltraDns, + DnsServerBootstrap::Vercel(_) => DnsServerBootstrapType::Vercel, + DnsServerBootstrap::Volcengine(_) => DnsServerBootstrapType::Volcengine, + DnsServerBootstrap::Vultr(_) => DnsServerBootstrapType::Vultr, + DnsServerBootstrap::WebSupport(_) => DnsServerBootstrapType::WebSupport, + DnsServerBootstrap::YandexCloud(_) => DnsServerBootstrapType::YandexCloud, + } + } +} + +impl DnsServerClouDns { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + if let Some(value) = &self.auth_id { + if value.is_empty() { + errors.push(ValidationError::required(Property::AuthId)); + } + } + if let Some(value) = &self.sub_auth_id { + if value.is_empty() { + errors.push(ValidationError::required(Property::SubAuthId)); + } + } + let value = &self.password; + value.validate(errors); + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerClouDns { + fn pickle(&self, out: &mut Vec) { + self.auth_id.pickle(out); + self.sub_auth_id.pickle(out); + self.password.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.auth_id = Pickle::unpickle(stream)?; + this.sub_auth_id = Pickle::unpickle(stream)?; + this.password = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerClouDns { + fn default() -> Self { + Self { + auth_id: Default::default(), + sub_auth_id: Default::default(), + password: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerClouDns { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(12); + map.insert_unchecked(Property::AuthId, self.auth_id.into_value()); + map.insert_unchecked(Property::SubAuthId, self.sub_auth_id.into_value()); + map.insert_unchecked(Property::Password, self.password.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerClouDns { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::AuthId) => self + .auth_id + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::SubAuthId) => self + .sub_auth_id + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Password) => self.password.patch(pointer, value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), } } } @@ -10890,11 +13923,6 @@ impl RegistryJsonPropertyPatch for DnsServerCloud { impl DnsServerCloudflare { fn validate(&self, errors: &mut Vec) -> bool { let neb = errors.len(); - if let Some(value) = &self.email { - if value.is_empty() { - errors.push(ValidationError::required(Property::Email)); - } - } let value = &self.secret; value.validate(errors); let value = &self.description; @@ -10919,7 +13947,6 @@ impl DnsServerCloudflare { impl Pickle for DnsServerCloudflare { fn pickle(&self, out: &mut Vec) { - self.email.pickle(out); self.secret.pickle(out); self.description.pickle(out); self.member_tenant_id.pickle(out); @@ -10932,7 +13959,9 @@ impl Pickle for DnsServerCloudflare { fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { let mut this = Self::default(); - this.email = Pickle::unpickle(stream)?; + if stream.version() < 1 { + let _: Option = Pickle::unpickle(stream)?; + } this.secret = Pickle::unpickle(stream)?; this.description = Pickle::unpickle(stream)?; this.member_tenant_id = Pickle::unpickle(stream)?; @@ -10948,7 +13977,6 @@ impl Pickle for DnsServerCloudflare { impl Default for DnsServerCloudflare { fn default() -> Self { Self { - email: Default::default(), secret: Default::default(), description: Default::default(), member_tenant_id: Default::default(), @@ -10963,8 +13991,7 @@ impl Default for DnsServerCloudflare { impl IntoValue for DnsServerCloudflare { fn into_value(self) -> JmapValue<'static> { - let mut map = jmap_tools::Map::with_capacity(11); - map.insert_unchecked(Property::Email, self.email.into_value()); + let mut map = jmap_tools::Map::with_capacity(10); map.insert_unchecked(Property::Secret, self.secret.into_value()); map.insert_unchecked(Property::Description, self.description.into_value()); map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); @@ -10993,8 +14020,404 @@ impl RegistryJsonPropertyPatch for DnsServerCloudflare { value: JmapValue<'x>, ) -> PatchResult<'x> { match pointer.next_property() { - Some(Property::Email) => self - .email + Some(property @ Property::Email) => Ok(MaybeUnpatched::Unpatched { property, value }), + Some(Property::Secret) => self.secret.patch(pointer, value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerConstellix { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.api_key; + if value.is_empty() { + errors.push(ValidationError::required(Property::ApiKey)); + } + let value = &self.secret_key; + value.validate(errors); + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerConstellix { + fn pickle(&self, out: &mut Vec) { + self.api_key.pickle(out); + self.secret_key.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.api_key = Pickle::unpickle(stream)?; + this.secret_key = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerConstellix { + fn default() -> Self { + Self { + api_key: Default::default(), + secret_key: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerConstellix { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(11); + map.insert_unchecked(Property::ApiKey, self.api_key.into_value()); + map.insert_unchecked(Property::SecretKey, self.secret_key.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerConstellix { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::ApiKey) => self + .api_key + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::SecretKey) => self.secret_key.patch(pointer, value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerCpanel { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.base_url; + if value.is_empty() { + errors.push(ValidationError::required(Property::BaseUrl)); + } + let value = &self.username; + if value.is_empty() { + errors.push(ValidationError::required(Property::Username)); + } + let value = &self.token; + value.validate(errors); + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerCpanel { + fn pickle(&self, out: &mut Vec) { + self.base_url.pickle(out); + self.username.pickle(out); + self.token.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.base_url = Pickle::unpickle(stream)?; + this.username = Pickle::unpickle(stream)?; + this.token = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerCpanel { + fn default() -> Self { + Self { + base_url: Default::default(), + username: Default::default(), + token: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerCpanel { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(12); + map.insert_unchecked(Property::BaseUrl, self.base_url.into_value()); + map.insert_unchecked(Property::Username, self.username.into_value()); + map.insert_unchecked(Property::Token, self.token.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerCpanel { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::BaseUrl) => self + .base_url + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Username) => self + .username + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Token) => self.token.patch(pointer, value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerDnsMadeEasy { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.api_key; + if value.is_empty() { + errors.push(ValidationError::required(Property::ApiKey)); + } + let value = &self.secret; + value.validate(errors); + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerDnsMadeEasy { + fn pickle(&self, out: &mut Vec) { + self.api_key.pickle(out); + self.secret.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.api_key = Pickle::unpickle(stream)?; + this.secret = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerDnsMadeEasy { + fn default() -> Self { + Self { + api_key: Default::default(), + secret: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerDnsMadeEasy { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(11); + map.insert_unchecked(Property::ApiKey, self.api_key.into_value()); + map.insert_unchecked(Property::Secret, self.secret.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerDnsMadeEasy { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::ApiKey) => self + .api_key .patch(pointer.with_validators(&[StringValidator::Trim]), value), Some(Property::Secret) => self.secret.patch(pointer, value), Some(Property::Description) => self @@ -11026,8 +14449,6 @@ impl DnsServerDnsimple { if value.is_empty() { errors.push(ValidationError::required(Property::AccountIdentifier)); } - let value = &self.secret; - value.validate(errors); let value = &self.description; if value.is_empty() { errors.push(ValidationError::required(Property::Description)); @@ -11052,7 +14473,6 @@ impl Pickle for DnsServerDnsimple { fn pickle(&self, out: &mut Vec) { self.auth_token.pickle(out); self.account_identifier.pickle(out); - self.secret.pickle(out); self.description.pickle(out); self.member_tenant_id.pickle(out); self.timeout.pickle(out); @@ -11066,7 +14486,9 @@ impl Pickle for DnsServerDnsimple { let mut this = Self::default(); this.auth_token = Pickle::unpickle(stream)?; this.account_identifier = Pickle::unpickle(stream)?; - this.secret = Pickle::unpickle(stream)?; + if stream.version() < 1 { + let _: SecretKey = Pickle::unpickle(stream)?; + } this.description = Pickle::unpickle(stream)?; this.member_tenant_id = Pickle::unpickle(stream)?; this.timeout = Pickle::unpickle(stream)?; @@ -11083,7 +14505,6 @@ impl Default for DnsServerDnsimple { Self { auth_token: Default::default(), account_identifier: Default::default(), - secret: Default::default(), description: Default::default(), member_tenant_id: Default::default(), timeout: Duration::from_millis(30000), @@ -11097,13 +14518,12 @@ impl Default for DnsServerDnsimple { impl IntoValue for DnsServerDnsimple { fn into_value(self) -> JmapValue<'static> { - let mut map = jmap_tools::Map::with_capacity(12); + let mut map = jmap_tools::Map::with_capacity(11); map.insert_unchecked(Property::AuthToken, self.auth_token.into_value()); map.insert_unchecked( Property::AccountIdentifier, self.account_identifier.into_value(), ); - map.insert_unchecked(Property::Secret, self.secret.into_value()); map.insert_unchecked(Property::Description, self.description.into_value()); map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); map.insert_unchecked(Property::Timeout, self.timeout.into_value()); @@ -11135,6 +14555,813 @@ impl RegistryJsonPropertyPatch for DnsServerDnsimple { Some(Property::AccountIdentifier) => self .account_identifier .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(property @ Property::Secret) => Ok(MaybeUnpatched::Unpatched { property, value }), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerDomeneshop { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.auth_token; + if value.is_empty() { + errors.push(ValidationError::required(Property::AuthToken)); + } + let value = &self.secret; + value.validate(errors); + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerDomeneshop { + fn pickle(&self, out: &mut Vec) { + self.auth_token.pickle(out); + self.secret.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.auth_token = Pickle::unpickle(stream)?; + this.secret = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerDomeneshop { + fn default() -> Self { + Self { + auth_token: Default::default(), + secret: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerDomeneshop { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(11); + map.insert_unchecked(Property::AuthToken, self.auth_token.into_value()); + map.insert_unchecked(Property::Secret, self.secret.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerDomeneshop { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::AuthToken) => self + .auth_token + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Secret) => self.secret.patch(pointer, value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerEasyDns { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.token; + if value.is_empty() { + errors.push(ValidationError::required(Property::Token)); + } + let value = &self.key; + value.validate(errors); + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerEasyDns { + fn pickle(&self, out: &mut Vec) { + self.token.pickle(out); + self.key.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.token = Pickle::unpickle(stream)?; + this.key = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerEasyDns { + fn default() -> Self { + Self { + token: Default::default(), + key: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerEasyDns { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(11); + map.insert_unchecked(Property::Token, self.token.into_value()); + map.insert_unchecked(Property::Key, self.key.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerEasyDns { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::Token) => self + .token + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Key) => self.key.patch(pointer, value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerEdgeDns { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.host; + if value.is_empty() { + errors.push(ValidationError::required(Property::Host)); + } + let value = &self.client_token; + if value.is_empty() { + errors.push(ValidationError::required(Property::ClientToken)); + } + let value = &self.client_secret; + value.validate(errors); + let value = &self.access_token; + value.validate(errors); + if let Some(value) = &self.account_switch_key { + if value.is_empty() { + errors.push(ValidationError::required(Property::AccountSwitchKey)); + } + } + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerEdgeDns { + fn pickle(&self, out: &mut Vec) { + self.host.pickle(out); + self.client_token.pickle(out); + self.client_secret.pickle(out); + self.access_token.pickle(out); + self.account_switch_key.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.host = Pickle::unpickle(stream)?; + this.client_token = Pickle::unpickle(stream)?; + this.client_secret = Pickle::unpickle(stream)?; + this.access_token = Pickle::unpickle(stream)?; + this.account_switch_key = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerEdgeDns { + fn default() -> Self { + Self { + host: Default::default(), + client_token: Default::default(), + client_secret: Default::default(), + access_token: Default::default(), + account_switch_key: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerEdgeDns { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(14); + map.insert_unchecked(Property::Host, self.host.into_value()); + map.insert_unchecked(Property::ClientToken, self.client_token.into_value()); + map.insert_unchecked(Property::ClientSecret, self.client_secret.into_value()); + map.insert_unchecked(Property::AccessToken, self.access_token.into_value()); + map.insert_unchecked( + Property::AccountSwitchKey, + self.account_switch_key.into_value(), + ); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerEdgeDns { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::Host) => self + .host + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::ClientToken) => self + .client_token + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::ClientSecret) => self.client_secret.patch(pointer, value), + Some(Property::AccessToken) => self.access_token.patch(pointer, value), + Some(Property::AccountSwitchKey) => self + .account_switch_key + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerExoscale { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.api_key; + if value.is_empty() { + errors.push(ValidationError::required(Property::ApiKey)); + } + let value = &self.secret; + value.validate(errors); + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerExoscale { + fn pickle(&self, out: &mut Vec) { + self.api_key.pickle(out); + self.secret.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.api_key = Pickle::unpickle(stream)?; + this.secret = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerExoscale { + fn default() -> Self { + Self { + api_key: Default::default(), + secret: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerExoscale { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(11); + map.insert_unchecked(Property::ApiKey, self.api_key.into_value()); + map.insert_unchecked(Property::Secret, self.secret.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerExoscale { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::ApiKey) => self + .api_key + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Secret) => self.secret.patch(pointer, value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerGlesys { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.api_user; + if value.is_empty() { + errors.push(ValidationError::required(Property::ApiUser)); + } + let value = &self.api_key; + value.validate(errors); + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerGlesys { + fn pickle(&self, out: &mut Vec) { + self.api_user.pickle(out); + self.api_key.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.api_user = Pickle::unpickle(stream)?; + this.api_key = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerGlesys { + fn default() -> Self { + Self { + api_user: Default::default(), + api_key: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerGlesys { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(11); + map.insert_unchecked(Property::ApiUser, self.api_user.into_value()); + map.insert_unchecked(Property::ApiKey, self.api_key.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerGlesys { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::ApiUser) => self + .api_user + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::ApiKey) => self.api_key.patch(pointer, value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerGodaddy { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.api_key; + if value.is_empty() { + errors.push(ValidationError::required(Property::ApiKey)); + } + let value = &self.secret; + value.validate(errors); + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerGodaddy { + fn pickle(&self, out: &mut Vec) { + self.api_key.pickle(out); + self.secret.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.api_key = Pickle::unpickle(stream)?; + this.secret = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerGodaddy { + fn default() -> Self { + Self { + api_key: Default::default(), + secret: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerGodaddy { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(11); + map.insert_unchecked(Property::ApiKey, self.api_key.into_value()); + map.insert_unchecked(Property::Secret, self.secret.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerGodaddy { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::ApiKey) => self + .api_key + .patch(pointer.with_validators(&[StringValidator::Trim]), value), Some(Property::Secret) => self.secret.patch(pointer, value), Some(Property::Description) => self .description @@ -11322,6 +15549,1990 @@ impl RegistryJsonPropertyPatch for DnsServerGoogleCloudDns { } } +impl DnsServerHuaweiCloud { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.access_key; + if value.is_empty() { + errors.push(ValidationError::required(Property::AccessKey)); + } + let value = &self.secret_key; + value.validate(errors); + let value = &self.region; + if value.is_empty() { + errors.push(ValidationError::required(Property::Region)); + } + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerHuaweiCloud { + fn pickle(&self, out: &mut Vec) { + self.access_key.pickle(out); + self.secret_key.pickle(out); + self.region.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.access_key = Pickle::unpickle(stream)?; + this.secret_key = Pickle::unpickle(stream)?; + this.region = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerHuaweiCloud { + fn default() -> Self { + Self { + access_key: Default::default(), + secret_key: Default::default(), + region: "ap-southeast-1".to_string(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerHuaweiCloud { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(12); + map.insert_unchecked(Property::AccessKey, self.access_key.into_value()); + map.insert_unchecked(Property::SecretKey, self.secret_key.into_value()); + map.insert_unchecked(Property::Region, self.region.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerHuaweiCloud { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::AccessKey) => self + .access_key + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::SecretKey) => self.secret_key.patch(pointer, value), + Some(Property::Region) => self + .region + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerHurricane { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.credentials; + for value in value.values() { + value.validate(errors); + } + if value.len() < 1 { + errors.push(ValidationError::min_items(Property::Credentials, 1)); + } + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerHurricane { + fn pickle(&self, out: &mut Vec) { + self.credentials.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.credentials = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerHurricane { + fn default() -> Self { + Self { + credentials: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerHurricane { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(10); + map.insert_unchecked(Property::Credentials, self.credentials.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerHurricane { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::Credentials) => self.credentials.patch(pointer, value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerIbmCloud { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.username; + if value.is_empty() { + errors.push(ValidationError::required(Property::Username)); + } + let value = &self.api_key; + value.validate(errors); + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerIbmCloud { + fn pickle(&self, out: &mut Vec) { + self.username.pickle(out); + self.api_key.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.username = Pickle::unpickle(stream)?; + this.api_key = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerIbmCloud { + fn default() -> Self { + Self { + username: Default::default(), + api_key: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerIbmCloud { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(11); + map.insert_unchecked(Property::Username, self.username.into_value()); + map.insert_unchecked(Property::ApiKey, self.api_key.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerIbmCloud { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::Username) => self + .username + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::ApiKey) => self.api_key.patch(pointer, value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerInfoblox { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.host; + if value.is_empty() { + errors.push(ValidationError::required(Property::Host)); + } + if let Some(value) = &self.port { + if value.is_empty() { + errors.push(ValidationError::required(Property::Port)); + } + } + let value = &self.username; + if value.is_empty() { + errors.push(ValidationError::required(Property::Username)); + } + let value = &self.password; + value.validate(errors); + if let Some(value) = &self.wapi_version { + if value.is_empty() { + errors.push(ValidationError::required(Property::WapiVersion)); + } + } + if let Some(value) = &self.dns_view { + if value.is_empty() { + errors.push(ValidationError::required(Property::DnsView)); + } + } + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerInfoblox { + fn pickle(&self, out: &mut Vec) { + self.host.pickle(out); + self.port.pickle(out); + self.username.pickle(out); + self.password.pickle(out); + self.wapi_version.pickle(out); + self.dns_view.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.host = Pickle::unpickle(stream)?; + this.port = Pickle::unpickle(stream)?; + this.username = Pickle::unpickle(stream)?; + this.password = Pickle::unpickle(stream)?; + this.wapi_version = Pickle::unpickle(stream)?; + this.dns_view = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerInfoblox { + fn default() -> Self { + Self { + host: Default::default(), + port: Default::default(), + username: Default::default(), + password: Default::default(), + wapi_version: Default::default(), + dns_view: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerInfoblox { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(15); + map.insert_unchecked(Property::Host, self.host.into_value()); + map.insert_unchecked(Property::Port, self.port.into_value()); + map.insert_unchecked(Property::Username, self.username.into_value()); + map.insert_unchecked(Property::Password, self.password.into_value()); + map.insert_unchecked(Property::WapiVersion, self.wapi_version.into_value()); + map.insert_unchecked(Property::DnsView, self.dns_view.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerInfoblox { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::Host) => self + .host + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Port) => self + .port + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Username) => self + .username + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Password) => self.password.patch(pointer, value), + Some(Property::WapiVersion) => self + .wapi_version + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::DnsView) => self + .dns_view + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerInwx { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.username; + if value.is_empty() { + errors.push(ValidationError::required(Property::Username)); + } + let value = &self.password; + value.validate(errors); + let value = &self.shared_secret; + value.validate(errors); + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerInwx { + fn pickle(&self, out: &mut Vec) { + self.username.pickle(out); + self.password.pickle(out); + self.shared_secret.pickle(out); + self.sandbox.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.username = Pickle::unpickle(stream)?; + this.password = Pickle::unpickle(stream)?; + this.shared_secret = Pickle::unpickle(stream)?; + this.sandbox = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerInwx { + fn default() -> Self { + Self { + username: Default::default(), + password: Default::default(), + shared_secret: Default::default(), + sandbox: false, + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerInwx { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(13); + map.insert_unchecked(Property::Username, self.username.into_value()); + map.insert_unchecked(Property::Password, self.password.into_value()); + map.insert_unchecked(Property::SharedSecret, self.shared_secret.into_value()); + map.insert_unchecked(Property::Sandbox, self.sandbox.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerInwx { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::Username) => self + .username + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Password) => self.password.patch(pointer, value), + Some(Property::SharedSecret) => self.shared_secret.patch(pointer, value), + Some(Property::Sandbox) => self.sandbox.patch(pointer, value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerJoker { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.auth; + value.validate(errors); + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerJoker { + fn pickle(&self, out: &mut Vec) { + self.auth.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.auth = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerJoker { + fn default() -> Self { + Self { + auth: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerJoker { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(10); + map.insert_unchecked(Property::Auth, self.auth.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerJoker { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::Auth) => self.auth.patch(pointer, value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerLightsail { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.access_key_id; + if value.is_empty() { + errors.push(ValidationError::required(Property::AccessKeyId)); + } + let value = &self.secret_access_key; + value.validate(errors); + let value = &self.session_token; + value.validate(errors); + if let Some(value) = &self.region { + if value.is_empty() { + errors.push(ValidationError::required(Property::Region)); + } + } + if let Some(value) = &self.domain { + if value.is_empty() { + errors.push(ValidationError::required(Property::Domain)); + } + } + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerLightsail { + fn pickle(&self, out: &mut Vec) { + self.access_key_id.pickle(out); + self.secret_access_key.pickle(out); + self.session_token.pickle(out); + self.region.pickle(out); + self.domain.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.access_key_id = Pickle::unpickle(stream)?; + this.secret_access_key = Pickle::unpickle(stream)?; + this.session_token = Pickle::unpickle(stream)?; + this.region = Pickle::unpickle(stream)?; + this.domain = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerLightsail { + fn default() -> Self { + Self { + access_key_id: Default::default(), + secret_access_key: Default::default(), + session_token: Default::default(), + region: Default::default(), + domain: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerLightsail { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(14); + map.insert_unchecked(Property::AccessKeyId, self.access_key_id.into_value()); + map.insert_unchecked( + Property::SecretAccessKey, + self.secret_access_key.into_value(), + ); + map.insert_unchecked(Property::SessionToken, self.session_token.into_value()); + map.insert_unchecked(Property::Region, self.region.into_value()); + map.insert_unchecked(Property::Domain, self.domain.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerLightsail { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::AccessKeyId) => self + .access_key_id + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::SecretAccessKey) => self.secret_access_key.patch(pointer, value), + Some(Property::SessionToken) => self.session_token.patch(pointer, value), + Some(Property::Region) => self + .region + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Domain) => self + .domain + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerLuaDns { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.username; + if value.is_empty() { + errors.push(ValidationError::required(Property::Username)); + } + let value = &self.auth_token; + value.validate(errors); + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerLuaDns { + fn pickle(&self, out: &mut Vec) { + self.username.pickle(out); + self.auth_token.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.username = Pickle::unpickle(stream)?; + this.auth_token = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerLuaDns { + fn default() -> Self { + Self { + username: Default::default(), + auth_token: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerLuaDns { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(11); + map.insert_unchecked(Property::Username, self.username.into_value()); + map.insert_unchecked(Property::AuthToken, self.auth_token.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerLuaDns { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::Username) => self + .username + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::AuthToken) => self.auth_token.patch(pointer, value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerMythicBeasts { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.username; + if value.is_empty() { + errors.push(ValidationError::required(Property::Username)); + } + let value = &self.password; + value.validate(errors); + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerMythicBeasts { + fn pickle(&self, out: &mut Vec) { + self.username.pickle(out); + self.password.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.username = Pickle::unpickle(stream)?; + this.password = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerMythicBeasts { + fn default() -> Self { + Self { + username: Default::default(), + password: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerMythicBeasts { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(11); + map.insert_unchecked(Property::Username, self.username.into_value()); + map.insert_unchecked(Property::Password, self.password.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerMythicBeasts { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::Username) => self + .username + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Password) => self.password.patch(pointer, value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerNameDotCom { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.username; + if value.is_empty() { + errors.push(ValidationError::required(Property::Username)); + } + let value = &self.auth_token; + value.validate(errors); + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerNameDotCom { + fn pickle(&self, out: &mut Vec) { + self.username.pickle(out); + self.auth_token.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.username = Pickle::unpickle(stream)?; + this.auth_token = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerNameDotCom { + fn default() -> Self { + Self { + username: Default::default(), + auth_token: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerNameDotCom { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(11); + map.insert_unchecked(Property::Username, self.username.into_value()); + map.insert_unchecked(Property::AuthToken, self.auth_token.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerNameDotCom { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::Username) => self + .username + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::AuthToken) => self.auth_token.patch(pointer, value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerNamecheap { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.api_user; + if value.is_empty() { + errors.push(ValidationError::required(Property::ApiUser)); + } + let value = &self.api_key; + value.validate(errors); + let value = &self.client_ip; + if value.is_empty() { + errors.push(ValidationError::required(Property::ClientIp)); + } + if let Some(value) = &self.username { + if value.is_empty() { + errors.push(ValidationError::required(Property::Username)); + } + } + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerNamecheap { + fn pickle(&self, out: &mut Vec) { + self.api_user.pickle(out); + self.api_key.pickle(out); + self.client_ip.pickle(out); + self.username.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.api_user = Pickle::unpickle(stream)?; + this.api_key = Pickle::unpickle(stream)?; + this.client_ip = Pickle::unpickle(stream)?; + this.username = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerNamecheap { + fn default() -> Self { + Self { + api_user: Default::default(), + api_key: Default::default(), + client_ip: Default::default(), + username: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerNamecheap { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(13); + map.insert_unchecked(Property::ApiUser, self.api_user.into_value()); + map.insert_unchecked(Property::ApiKey, self.api_key.into_value()); + map.insert_unchecked(Property::ClientIp, self.client_ip.into_value()); + map.insert_unchecked(Property::Username, self.username.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerNamecheap { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::ApiUser) => self + .api_user + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::ApiKey) => self.api_key.patch(pointer, value), + Some(Property::ClientIp) => self + .client_ip + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Username) => self + .username + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerNetcup { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.customer_number; + if value.is_empty() { + errors.push(ValidationError::required(Property::CustomerNumber)); + } + let value = &self.api_key; + if value.is_empty() { + errors.push(ValidationError::required(Property::ApiKey)); + } + let value = &self.password; + value.validate(errors); + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerNetcup { + fn pickle(&self, out: &mut Vec) { + self.customer_number.pickle(out); + self.api_key.pickle(out); + self.password.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.customer_number = Pickle::unpickle(stream)?; + this.api_key = Pickle::unpickle(stream)?; + this.password = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerNetcup { + fn default() -> Self { + Self { + customer_number: Default::default(), + api_key: Default::default(), + password: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerNetcup { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(12); + map.insert_unchecked(Property::CustomerNumber, self.customer_number.into_value()); + map.insert_unchecked(Property::ApiKey, self.api_key.into_value()); + map.insert_unchecked(Property::Password, self.password.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerNetcup { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::CustomerNumber) => self + .customer_number + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::ApiKey) => self + .api_key + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Password) => self.password.patch(pointer, value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerNifcloud { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.access_key; + if value.is_empty() { + errors.push(ValidationError::required(Property::AccessKey)); + } + let value = &self.secret_key; + value.validate(errors); + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerNifcloud { + fn pickle(&self, out: &mut Vec) { + self.access_key.pickle(out); + self.secret_key.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.access_key = Pickle::unpickle(stream)?; + this.secret_key = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerNifcloud { + fn default() -> Self { + Self { + access_key: Default::default(), + secret_key: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerNifcloud { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(11); + map.insert_unchecked(Property::AccessKey, self.access_key.into_value()); + map.insert_unchecked(Property::SecretKey, self.secret_key.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerNifcloud { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::AccessKey) => self + .access_key + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::SecretKey) => self.secret_key.patch(pointer, value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerOracleCloud { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.tenancy_ocid; + if value.is_empty() { + errors.push(ValidationError::required(Property::TenancyOcid)); + } + let value = &self.user_ocid; + if value.is_empty() { + errors.push(ValidationError::required(Property::UserOcid)); + } + let value = &self.fingerprint; + if value.is_empty() { + errors.push(ValidationError::required(Property::Fingerprint)); + } + let value = &self.private_key_pem; + value.validate(errors); + let value = &self.private_key_password; + value.validate(errors); + let value = &self.region; + if value.is_empty() { + errors.push(ValidationError::required(Property::Region)); + } + let value = &self.compartment_ocid; + if value.is_empty() { + errors.push(ValidationError::required(Property::CompartmentOcid)); + } + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerOracleCloud { + fn pickle(&self, out: &mut Vec) { + self.tenancy_ocid.pickle(out); + self.user_ocid.pickle(out); + self.fingerprint.pickle(out); + self.private_key_pem.pickle(out); + self.private_key_password.pickle(out); + self.region.pickle(out); + self.compartment_ocid.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.tenancy_ocid = Pickle::unpickle(stream)?; + this.user_ocid = Pickle::unpickle(stream)?; + this.fingerprint = Pickle::unpickle(stream)?; + this.private_key_pem = Pickle::unpickle(stream)?; + this.private_key_password = Pickle::unpickle(stream)?; + this.region = Pickle::unpickle(stream)?; + this.compartment_ocid = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerOracleCloud { + fn default() -> Self { + Self { + tenancy_ocid: Default::default(), + user_ocid: Default::default(), + fingerprint: Default::default(), + private_key_pem: Default::default(), + private_key_password: Default::default(), + region: Default::default(), + compartment_ocid: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerOracleCloud { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(16); + map.insert_unchecked(Property::TenancyOcid, self.tenancy_ocid.into_value()); + map.insert_unchecked(Property::UserOcid, self.user_ocid.into_value()); + map.insert_unchecked(Property::Fingerprint, self.fingerprint.into_value()); + map.insert_unchecked(Property::PrivateKeyPem, self.private_key_pem.into_value()); + map.insert_unchecked( + Property::PrivateKeyPassword, + self.private_key_password.into_value(), + ); + map.insert_unchecked(Property::Region, self.region.into_value()); + map.insert_unchecked( + Property::CompartmentOcid, + self.compartment_ocid.into_value(), + ); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerOracleCloud { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::TenancyOcid) => self + .tenancy_ocid + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::UserOcid) => self + .user_ocid + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Fingerprint) => self + .fingerprint + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::PrivateKeyPem) => self.private_key_pem.patch(pointer, value), + Some(Property::PrivateKeyPassword) => self.private_key_password.patch(pointer, value), + Some(Property::Region) => self + .region + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::CompartmentOcid) => self + .compartment_ocid + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + impl DnsServerOvh { fn validate(&self, errors: &mut Vec) -> bool { let neb = errors.len(); @@ -11466,6 +17677,135 @@ impl RegistryJsonPropertyPatch for DnsServerOvh { } } +impl DnsServerPlesk { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.base_url; + if value.is_empty() { + errors.push(ValidationError::required(Property::BaseUrl)); + } + let value = &self.api_key; + value.validate(errors); + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerPlesk { + fn pickle(&self, out: &mut Vec) { + self.base_url.pickle(out); + self.api_key.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.base_url = Pickle::unpickle(stream)?; + this.api_key = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerPlesk { + fn default() -> Self { + Self { + base_url: Default::default(), + api_key: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerPlesk { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(11); + map.insert_unchecked(Property::BaseUrl, self.base_url.into_value()); + map.insert_unchecked(Property::ApiKey, self.api_key.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerPlesk { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::BaseUrl) => self + .base_url + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::ApiKey) => self.api_key.patch(pointer, value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + impl DnsServerPorkbun { fn validate(&self, errors: &mut Vec) -> bool { let neb = errors.len(); @@ -11475,8 +17815,6 @@ impl DnsServerPorkbun { } let value = &self.secret_api_key; value.validate(errors); - let value = &self.secret; - value.validate(errors); let value = &self.description; if value.is_empty() { errors.push(ValidationError::required(Property::Description)); @@ -11501,7 +17839,6 @@ impl Pickle for DnsServerPorkbun { fn pickle(&self, out: &mut Vec) { self.api_key.pickle(out); self.secret_api_key.pickle(out); - self.secret.pickle(out); self.description.pickle(out); self.member_tenant_id.pickle(out); self.timeout.pickle(out); @@ -11515,7 +17852,9 @@ impl Pickle for DnsServerPorkbun { let mut this = Self::default(); this.api_key = Pickle::unpickle(stream)?; this.secret_api_key = Pickle::unpickle(stream)?; - this.secret = Pickle::unpickle(stream)?; + if stream.version() < 1 { + let _: SecretKey = Pickle::unpickle(stream)?; + } this.description = Pickle::unpickle(stream)?; this.member_tenant_id = Pickle::unpickle(stream)?; this.timeout = Pickle::unpickle(stream)?; @@ -11532,7 +17871,6 @@ impl Default for DnsServerPorkbun { Self { api_key: Default::default(), secret_api_key: Default::default(), - secret: Default::default(), description: Default::default(), member_tenant_id: Default::default(), timeout: Duration::from_millis(30000), @@ -11546,10 +17884,9 @@ impl Default for DnsServerPorkbun { impl IntoValue for DnsServerPorkbun { fn into_value(self) -> JmapValue<'static> { - let mut map = jmap_tools::Map::with_capacity(12); + let mut map = jmap_tools::Map::with_capacity(11); map.insert_unchecked(Property::ApiKey, self.api_key.into_value()); map.insert_unchecked(Property::SecretApiKey, self.secret_api_key.into_value()); - map.insert_unchecked(Property::Secret, self.secret.into_value()); map.insert_unchecked(Property::Description, self.description.into_value()); map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); map.insert_unchecked(Property::Timeout, self.timeout.into_value()); @@ -11581,7 +17918,7 @@ impl RegistryJsonPropertyPatch for DnsServerPorkbun { .api_key .patch(pointer.with_validators(&[StringValidator::Trim]), value), Some(Property::SecretApiKey) => self.secret_api_key.patch(pointer, value), - Some(Property::Secret) => self.secret.patch(pointer, value), + Some(property @ Property::Secret) => Ok(MaybeUnpatched::Unpatched { property, value }), Some(Property::Description) => self .description .patch(pointer.with_validators(&[StringValidator::Trim]), value), @@ -11772,179 +18109,6 @@ impl RegistryJsonPropertyPatch for DnsServerRoute53 { } } -impl DnsServerSig0 { - fn validate(&self, errors: &mut Vec) -> bool { - let neb = errors.len(); - let value = &self.host; - if !value.is_valid() { - errors.push(ValidationError::invalid(Property::Host, value)); - } - let value = &self.port; - if *value > 65535 { - errors.push(ValidationError::max_value(Property::Port, 65535)); - } - if *value < 1 { - errors.push(ValidationError::min_value(Property::Port, 1)); - } - let value = &self.public_key; - if value.is_empty() { - errors.push(ValidationError::required(Property::PublicKey)); - } - let value = &self.key; - value.validate(errors); - let value = &self.signer_name; - if value.is_empty() { - errors.push(ValidationError::required(Property::SignerName)); - } - let value = &self.description; - if value.is_empty() { - errors.push(ValidationError::required(Property::Description)); - } - if let Some(value) = &self.member_tenant_id { - if !value.is_valid() { - errors.push(ValidationError::required(Property::MemberTenantId)); - } - } - errors.len() == neb - } - - fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { - i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); - if let Some(value) = &self.member_tenant_id { - i.search(Property::MemberTenantId, value); - } - } -} - -impl Pickle for DnsServerSig0 { - fn pickle(&self, out: &mut Vec) { - self.host.pickle(out); - self.port.pickle(out); - self.public_key.pickle(out); - self.key.pickle(out); - self.signer_name.pickle(out); - self.protocol.pickle(out); - self.sig0_algorithm.pickle(out); - self.description.pickle(out); - self.member_tenant_id.pickle(out); - self.timeout.pickle(out); - self.ttl.pickle(out); - self.polling_interval.pickle(out); - self.propagation_timeout.pickle(out); - self.propagation_delay.pickle(out); - } - - fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { - let mut this = Self::default(); - this.host = Pickle::unpickle(stream)?; - this.port = Pickle::unpickle(stream)?; - this.public_key = Pickle::unpickle(stream)?; - this.key = Pickle::unpickle(stream)?; - this.signer_name = Pickle::unpickle(stream)?; - this.protocol = Pickle::unpickle(stream)?; - this.sig0_algorithm = Pickle::unpickle(stream)?; - this.description = Pickle::unpickle(stream)?; - this.member_tenant_id = Pickle::unpickle(stream)?; - this.timeout = Pickle::unpickle(stream)?; - this.ttl = Pickle::unpickle(stream)?; - this.polling_interval = Pickle::unpickle(stream)?; - this.propagation_timeout = Pickle::unpickle(stream)?; - this.propagation_delay = Pickle::unpickle(stream)?; - Some(this) - } -} - -impl Default for DnsServerSig0 { - fn default() -> Self { - Self { - host: Default::default(), - port: 53u64, - public_key: Default::default(), - key: Default::default(), - signer_name: Default::default(), - protocol: IpProtocol::Udp, - sig0_algorithm: Sig0Algorithm::Ed25519, - description: Default::default(), - member_tenant_id: Default::default(), - timeout: Duration::from_millis(30000), - ttl: Duration::from_millis(300000), - polling_interval: Duration::from_millis(15000), - propagation_timeout: Duration::from_millis(60000), - propagation_delay: Default::default(), - } - } -} - -impl IntoValue for DnsServerSig0 { - fn into_value(self) -> JmapValue<'static> { - let mut map = jmap_tools::Map::with_capacity(16); - map.insert_unchecked(Property::Host, self.host.into_value()); - map.insert_unchecked(Property::Port, self.port.into_value()); - map.insert_unchecked(Property::PublicKey, self.public_key.into_value()); - map.insert_unchecked(Property::Key, self.key.into_value()); - map.insert_unchecked(Property::SignerName, self.signer_name.into_value()); - map.insert_unchecked(Property::Protocol, self.protocol.into_value()); - map.insert_unchecked(Property::Sig0Algorithm, self.sig0_algorithm.into_value()); - map.insert_unchecked(Property::Description, self.description.into_value()); - map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); - map.insert_unchecked(Property::Timeout, self.timeout.into_value()); - map.insert_unchecked(Property::Ttl, self.ttl.into_value()); - map.insert_unchecked( - Property::PollingInterval, - self.polling_interval.into_value(), - ); - map.insert_unchecked( - Property::PropagationTimeout, - self.propagation_timeout.into_value(), - ); - map.insert_unchecked( - Property::PropagationDelay, - self.propagation_delay.into_value(), - ); - JmapValue::Object(map) - } -} - -impl RegistryJsonPropertyPatch for DnsServerSig0 { - fn patch_property<'x>( - &mut self, - mut pointer: JsonPointerPatch<'_>, - value: JmapValue<'x>, - ) -> PatchResult<'x> { - match pointer.next_property() { - Some(Property::Host) => self - .host - .patch(pointer.with_validators(&[StringValidator::Trim]), value), - Some(Property::Port) => self.port.patch(pointer, value), - Some(Property::PublicKey) => self - .public_key - .patch(pointer.with_validators(&[StringValidator::Trim]), value), - Some(Property::Key) => self.key.patch(pointer, value), - Some(Property::SignerName) => self - .signer_name - .patch(pointer.with_validators(&[StringValidator::Trim]), value), - Some(Property::Protocol) => self.protocol.patch(pointer, value), - Some(Property::Sig0Algorithm) => self.sig0_algorithm.patch(pointer, value), - Some(Property::Description) => self - .description - .patch(pointer.with_validators(&[StringValidator::Trim]), value), - Some(Property::MemberTenantId) => self - .member_tenant_id - .patch(pointer.assert_can_set_tenant()?, value), - Some(Property::Timeout) => self.timeout.patch(pointer, value), - Some(Property::Ttl) => self.ttl.patch(pointer, value), - Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), - Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), - Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), - Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { - property: Property::Type, - value, - }), - _ => Err(PatchError::new(pointer, "Invalid property")), - } - } -} - impl DnsServerSpaceship { fn validate(&self, errors: &mut Vec) -> bool { let neb = errors.len(); @@ -12074,6 +18238,283 @@ impl RegistryJsonPropertyPatch for DnsServerSpaceship { } } +impl DnsServerTencentCloud { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.secret_id; + if value.is_empty() { + errors.push(ValidationError::required(Property::SecretId)); + } + let value = &self.secret_key; + value.validate(errors); + if let Some(value) = &self.region { + if value.is_empty() { + errors.push(ValidationError::required(Property::Region)); + } + } + let value = &self.session_token; + value.validate(errors); + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerTencentCloud { + fn pickle(&self, out: &mut Vec) { + self.secret_id.pickle(out); + self.secret_key.pickle(out); + self.region.pickle(out); + self.session_token.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.secret_id = Pickle::unpickle(stream)?; + this.secret_key = Pickle::unpickle(stream)?; + this.region = Pickle::unpickle(stream)?; + this.session_token = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerTencentCloud { + fn default() -> Self { + Self { + secret_id: Default::default(), + secret_key: Default::default(), + region: Default::default(), + session_token: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerTencentCloud { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(13); + map.insert_unchecked(Property::SecretId, self.secret_id.into_value()); + map.insert_unchecked(Property::SecretKey, self.secret_key.into_value()); + map.insert_unchecked(Property::Region, self.region.into_value()); + map.insert_unchecked(Property::SessionToken, self.session_token.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerTencentCloud { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::SecretId) => self + .secret_id + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::SecretKey) => self.secret_key.patch(pointer, value), + Some(Property::Region) => self + .region + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::SessionToken) => self.session_token.patch(pointer, value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerTransip { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.username; + if value.is_empty() { + errors.push(ValidationError::required(Property::Username)); + } + let value = &self.private_key_pem; + value.validate(errors); + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerTransip { + fn pickle(&self, out: &mut Vec) { + self.username.pickle(out); + self.private_key_pem.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.username = Pickle::unpickle(stream)?; + this.private_key_pem = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerTransip { + fn default() -> Self { + Self { + username: Default::default(), + private_key_pem: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerTransip { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(11); + map.insert_unchecked(Property::Username, self.username.into_value()); + map.insert_unchecked(Property::PrivateKeyPem, self.private_key_pem.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerTransip { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::Username) => self + .username + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::PrivateKeyPem) => self.private_key_pem.patch(pointer, value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + impl DnsServerTsig { fn validate(&self, errors: &mut Vec) -> bool { let neb = errors.len(); @@ -12236,6 +18677,700 @@ impl RegistryJsonPropertyPatch for DnsServerTsig { } } +impl DnsServerUltraDns { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.username; + if value.is_empty() { + errors.push(ValidationError::required(Property::Username)); + } + let value = &self.password; + value.validate(errors); + if let Some(value) = &self.endpoint { + if value.is_empty() { + errors.push(ValidationError::required(Property::Endpoint)); + } + } + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerUltraDns { + fn pickle(&self, out: &mut Vec) { + self.username.pickle(out); + self.password.pickle(out); + self.endpoint.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.username = Pickle::unpickle(stream)?; + this.password = Pickle::unpickle(stream)?; + this.endpoint = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerUltraDns { + fn default() -> Self { + Self { + username: Default::default(), + password: Default::default(), + endpoint: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerUltraDns { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(12); + map.insert_unchecked(Property::Username, self.username.into_value()); + map.insert_unchecked(Property::Password, self.password.into_value()); + map.insert_unchecked(Property::Endpoint, self.endpoint.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerUltraDns { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::Username) => self + .username + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Password) => self.password.patch(pointer, value), + Some(Property::Endpoint) => self + .endpoint + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerVercel { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.auth_token; + value.validate(errors); + if let Some(value) = &self.team_id { + if value.is_empty() { + errors.push(ValidationError::required(Property::TeamId)); + } + } + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerVercel { + fn pickle(&self, out: &mut Vec) { + self.auth_token.pickle(out); + self.team_id.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.auth_token = Pickle::unpickle(stream)?; + this.team_id = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerVercel { + fn default() -> Self { + Self { + auth_token: Default::default(), + team_id: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerVercel { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(11); + map.insert_unchecked(Property::AuthToken, self.auth_token.into_value()); + map.insert_unchecked(Property::TeamId, self.team_id.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerVercel { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::AuthToken) => self.auth_token.patch(pointer, value), + Some(Property::TeamId) => self + .team_id + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerVolcengine { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.access_key; + if value.is_empty() { + errors.push(ValidationError::required(Property::AccessKey)); + } + let value = &self.secret_key; + value.validate(errors); + if let Some(value) = &self.region { + if value.is_empty() { + errors.push(ValidationError::required(Property::Region)); + } + } + if let Some(value) = &self.host { + if value.is_empty() { + errors.push(ValidationError::required(Property::Host)); + } + } + if let Some(value) = &self.scheme { + if value.is_empty() { + errors.push(ValidationError::required(Property::Scheme)); + } + } + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerVolcengine { + fn pickle(&self, out: &mut Vec) { + self.access_key.pickle(out); + self.secret_key.pickle(out); + self.region.pickle(out); + self.host.pickle(out); + self.scheme.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.access_key = Pickle::unpickle(stream)?; + this.secret_key = Pickle::unpickle(stream)?; + this.region = Pickle::unpickle(stream)?; + this.host = Pickle::unpickle(stream)?; + this.scheme = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerVolcengine { + fn default() -> Self { + Self { + access_key: Default::default(), + secret_key: Default::default(), + region: Default::default(), + host: Default::default(), + scheme: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerVolcengine { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(14); + map.insert_unchecked(Property::AccessKey, self.access_key.into_value()); + map.insert_unchecked(Property::SecretKey, self.secret_key.into_value()); + map.insert_unchecked(Property::Region, self.region.into_value()); + map.insert_unchecked(Property::Host, self.host.into_value()); + map.insert_unchecked(Property::Scheme, self.scheme.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerVolcengine { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::AccessKey) => self + .access_key + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::SecretKey) => self.secret_key.patch(pointer, value), + Some(Property::Region) => self + .region + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Host) => self + .host + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Scheme) => self + .scheme + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerWebSupport { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.api_key; + if value.is_empty() { + errors.push(ValidationError::required(Property::ApiKey)); + } + let value = &self.secret; + value.validate(errors); + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerWebSupport { + fn pickle(&self, out: &mut Vec) { + self.api_key.pickle(out); + self.secret.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.api_key = Pickle::unpickle(stream)?; + this.secret = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerWebSupport { + fn default() -> Self { + Self { + api_key: Default::default(), + secret: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerWebSupport { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(11); + map.insert_unchecked(Property::ApiKey, self.api_key.into_value()); + map.insert_unchecked(Property::Secret, self.secret.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerWebSupport { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::ApiKey) => self + .api_key + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Secret) => self.secret.patch(pointer, value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl DnsServerYandexCloud { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.api_key; + value.validate(errors); + let value = &self.folder_id; + if value.is_empty() { + errors.push(ValidationError::required(Property::FolderId)); + } + let value = &self.description; + if value.is_empty() { + errors.push(ValidationError::required(Property::Description)); + } + if let Some(value) = &self.member_tenant_id { + if !value.is_valid() { + errors.push(ValidationError::required(Property::MemberTenantId)); + } + } + errors.len() == neb + } + + fn index<'x>(&'x self, i: &mut IndexBuilder<'x>) { + i.foreign_key(ObjectType::Tenant, self.member_tenant_id, None); + if let Some(value) = &self.member_tenant_id { + i.search(Property::MemberTenantId, value); + } + } +} + +impl Pickle for DnsServerYandexCloud { + fn pickle(&self, out: &mut Vec) { + self.api_key.pickle(out); + self.folder_id.pickle(out); + self.description.pickle(out); + self.member_tenant_id.pickle(out); + self.timeout.pickle(out); + self.ttl.pickle(out); + self.polling_interval.pickle(out); + self.propagation_timeout.pickle(out); + self.propagation_delay.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.api_key = Pickle::unpickle(stream)?; + this.folder_id = Pickle::unpickle(stream)?; + this.description = Pickle::unpickle(stream)?; + this.member_tenant_id = Pickle::unpickle(stream)?; + this.timeout = Pickle::unpickle(stream)?; + this.ttl = Pickle::unpickle(stream)?; + this.polling_interval = Pickle::unpickle(stream)?; + this.propagation_timeout = Pickle::unpickle(stream)?; + this.propagation_delay = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for DnsServerYandexCloud { + fn default() -> Self { + Self { + api_key: Default::default(), + folder_id: Default::default(), + description: Default::default(), + member_tenant_id: Default::default(), + timeout: Duration::from_millis(30000), + ttl: Duration::from_millis(300000), + polling_interval: Duration::from_millis(15000), + propagation_timeout: Duration::from_millis(60000), + propagation_delay: Default::default(), + } + } +} + +impl IntoValue for DnsServerYandexCloud { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(11); + map.insert_unchecked(Property::ApiKey, self.api_key.into_value()); + map.insert_unchecked(Property::FolderId, self.folder_id.into_value()); + map.insert_unchecked(Property::Description, self.description.into_value()); + map.insert_unchecked(Property::MemberTenantId, self.member_tenant_id.into_value()); + map.insert_unchecked(Property::Timeout, self.timeout.into_value()); + map.insert_unchecked(Property::Ttl, self.ttl.into_value()); + map.insert_unchecked( + Property::PollingInterval, + self.polling_interval.into_value(), + ); + map.insert_unchecked( + Property::PropagationTimeout, + self.propagation_timeout.into_value(), + ); + map.insert_unchecked( + Property::PropagationDelay, + self.propagation_delay.into_value(), + ); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for DnsServerYandexCloud { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::ApiKey) => self.api_key.patch(pointer, value), + Some(Property::FolderId) => self + .folder_id + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Description) => self + .description + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::MemberTenantId) => self + .member_tenant_id + .patch(pointer.assert_can_set_tenant()?, value), + Some(Property::Timeout) => self.timeout.patch(pointer, value), + Some(Property::Ttl) => self.ttl.patch(pointer, value), + Some(Property::PollingInterval) => self.polling_interval.patch(pointer, value), + Some(Property::PropagationTimeout) => self.propagation_timeout.patch(pointer, value), + Some(Property::PropagationDelay) => self.propagation_delay.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + impl ObjectImpl for Domain { const FLAGS: u64 = OBJ_FILTER_TENANT | OBJ_SEQ_ID; const VERSION: u8 = 0; @@ -14901,6 +22036,72 @@ impl HttpLookupFormat { } } +impl HurricaneCredential { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.zone; + if value.is_empty() { + errors.push(ValidationError::required(Property::Zone)); + } + let value = &self.secret; + value.validate(errors); + errors.len() == neb + } +} + +impl Pickle for HurricaneCredential { + fn pickle(&self, out: &mut Vec) { + self.zone.pickle(out); + self.secret.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.zone = Pickle::unpickle(stream)?; + this.secret = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for HurricaneCredential { + fn default() -> Self { + Self { + zone: Default::default(), + secret: Default::default(), + } + } +} + +impl IntoValue for HurricaneCredential { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(4); + map.insert_unchecked(Property::Zone, self.zone.into_value()); + map.insert_unchecked(Property::Secret, self.secret.into_value()); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for HurricaneCredential { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::Zone) => self.zone.patch( + pointer.with_validators(&[StringValidator::Domain, StringValidator::Trim]), + value, + ), + Some(Property::Secret) => self.secret.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + impl ObjectImpl for Imap { const FLAGS: u64 = OBJ_SINGLETON; const VERSION: u8 = 0; @@ -15570,6 +22771,214 @@ impl RegistryJsonPropertyPatch for Jmap { } } +impl JokerAuth { + fn validate(&self, errors: &mut Vec) -> bool { + match self { + JokerAuth::ApiKey(inner) => inner.validate(errors), + JokerAuth::UsernamePassword(inner) => inner.validate(errors), + } + } +} + +impl Default for JokerAuth { + fn default() -> Self { + JokerAuth::ApiKey(Default::default()) + } +} + +impl Pickle for JokerAuth { + fn pickle(&self, out: &mut Vec) { + match self { + JokerAuth::ApiKey(inner) => { + 0u16.pickle(out); + inner.pickle(out); + } + JokerAuth::UsernamePassword(inner) => { + 1u16.pickle(out); + inner.pickle(out); + } + } + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + match u16::unpickle(stream)? { + 0 => Pickle::unpickle(stream).map(JokerAuth::ApiKey), + 1 => Pickle::unpickle(stream).map(JokerAuth::UsernamePassword), + _ => None, + } + } +} + +impl IntoValue for JokerAuth { + fn into_value(self) -> JmapValue<'static> { + match self { + JokerAuth::ApiKey(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("ApiKey".into())); + obj + } + JokerAuth::UsernamePassword(obj) => { + let mut obj = obj.into_value(); + obj.as_object_mut() + .unwrap() + .insert_unchecked(Property::Type, JmapValue::Str("UsernamePassword".into())); + obj + } + } + } +} + +impl RegistryJsonPatch for JokerAuth { + fn patch<'x>( + &mut self, + pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + if !pointer.has_next() { + match object_type(&pointer, &value)? { + JokerAuthType::ApiKey => *self = JokerAuth::ApiKey(Default::default()), + JokerAuthType::UsernamePassword => { + *self = JokerAuth::UsernamePassword(Default::default()) + } + } + } + match self { + JokerAuth::ApiKey(inner) => inner.patch(pointer, value), + JokerAuth::UsernamePassword(inner) => inner.patch(pointer, value), + } + } +} + +impl JokerAuth { + pub fn object_type(&self) -> JokerAuthType { + match self { + JokerAuth::ApiKey(_) => JokerAuthType::ApiKey, + JokerAuth::UsernamePassword(_) => JokerAuthType::UsernamePassword, + } + } +} + +impl JokerAuthApiKey { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.api_key; + value.validate(errors); + errors.len() == neb + } +} + +impl Pickle for JokerAuthApiKey { + fn pickle(&self, out: &mut Vec) { + self.api_key.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.api_key = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for JokerAuthApiKey { + fn default() -> Self { + Self { + api_key: Default::default(), + } + } +} + +impl IntoValue for JokerAuthApiKey { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(3); + map.insert_unchecked(Property::ApiKey, self.api_key.into_value()); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for JokerAuthApiKey { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::ApiKey) => self.api_key.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + +impl JokerAuthUsernamePassword { + fn validate(&self, errors: &mut Vec) -> bool { + let neb = errors.len(); + let value = &self.username; + if value.is_empty() { + errors.push(ValidationError::required(Property::Username)); + } + let value = &self.password; + value.validate(errors); + errors.len() == neb + } +} + +impl Pickle for JokerAuthUsernamePassword { + fn pickle(&self, out: &mut Vec) { + self.username.pickle(out); + self.password.pickle(out); + } + + fn unpickle(stream: &mut crate::pickle::PickledStream<'_>) -> Option { + let mut this = Self::default(); + this.username = Pickle::unpickle(stream)?; + this.password = Pickle::unpickle(stream)?; + Some(this) + } +} + +impl Default for JokerAuthUsernamePassword { + fn default() -> Self { + Self { + username: Default::default(), + password: Default::default(), + } + } +} + +impl IntoValue for JokerAuthUsernamePassword { + fn into_value(self) -> JmapValue<'static> { + let mut map = jmap_tools::Map::with_capacity(4); + map.insert_unchecked(Property::Username, self.username.into_value()); + map.insert_unchecked(Property::Password, self.password.into_value()); + JmapValue::Object(map) + } +} + +impl RegistryJsonPropertyPatch for JokerAuthUsernamePassword { + fn patch_property<'x>( + &mut self, + mut pointer: JsonPointerPatch<'_>, + value: JmapValue<'x>, + ) -> PatchResult<'x> { + match pointer.next_property() { + Some(Property::Username) => self + .username + .patch(pointer.with_validators(&[StringValidator::Trim]), value), + Some(Property::Password) => self.password.patch(pointer, value), + Some(Property::Type) => Ok(MaybeUnpatched::Unpatched { + property: Property::Type, + value, + }), + _ => Err(PatchError::new(pointer, "Invalid property")), + } + } +} + impl KafkaCoordinator { fn validate(&self, errors: &mut Vec) -> bool { let neb = errors.len(); diff --git a/crates/services/Cargo.toml b/crates/services/Cargo.toml index 36777e77..9c0046fb 100644 --- a/crates/services/Cargo.toml +++ b/crates/services/Cargo.toml @@ -34,7 +34,7 @@ sha2 = "0.11" reqwest = { version = "0.13", default-features = false, features = ["rustls", "http2"]} base64 = "0.22" compact_str = "0.9.0" -dns-update = { version = "0.3" } +dns-update = { version = "0.4.0" } [dev-dependencies] diff --git a/resources/schema/schema.json.gz b/resources/schema/schema.json.gz index 32683f3a..3a4b791e 100644 Binary files a/resources/schema/schema.json.gz and b/resources/schema/schema.json.gz differ diff --git a/resources/schema/schema.json.sha256 b/resources/schema/schema.json.sha256 index 959acc96..bc65d190 100644 --- a/resources/schema/schema.json.sha256 +++ b/resources/schema/schema.json.sha256 @@ -1 +1 @@ -YT3bugHVH3b13x2txy17kankEO0OqL9os_sojzqXlxo \ No newline at end of file +nGrZtt6AUdU1bcCirQQzKiHbnluseipQ1zi4wqAu0AY \ No newline at end of file diff --git a/tests/Cargo.toml b/tests/Cargo.toml index 77394eeb..356d7c46 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -81,7 +81,7 @@ rkyv = { version = "0.8.10", features = ["little_endian"] } compact_str = "0.9.0" quick-xml = "0.39" jmap-tools = { version = "0.1" } -dns-update = { version = "0.3", features = ["test_provider"] } +dns-update = { version = "0.4.0", features = ["test_provider"] } x509-parser = "0.18" [target.'cfg(not(target_env = "msvc"))'.dependencies] diff --git a/tests/src/automation/acme.rs b/tests/src/automation/acme.rs index b1c007dc..562b68b3 100644 --- a/tests/src/automation/acme.rs +++ b/tests/src/automation/acme.rs @@ -139,9 +139,8 @@ pub async fn test(test: &TestServer) { // Create test Pebble and In Memory DNS servers let pebble_dns_id = account .registry_create_object(DnsServer::Cloudflare(DnsServerCloudflare { - email: "test@pebble.org".to_string().into(), secret: SecretKey::Value(SecretKeyValue { - secret: "secret".into(), + secret: "test@pebble.org".into(), }), description: "Pebble DNS server".to_string(), ..Default::default() @@ -149,9 +148,8 @@ pub async fn test(test: &TestServer) { .await; let in_memory_dns_id = account .registry_create_object(DnsServer::Cloudflare(DnsServerCloudflare { - email: "test@memory.org".to_string().into(), secret: SecretKey::Value(SecretKeyValue { - secret: "secret".into(), + secret: "test@memory.org".into(), }), description: "In-memory DNS server".to_string(), ..Default::default() diff --git a/tests/src/automation/dkim.rs b/tests/src/automation/dkim.rs index 9d9d7813..b7257873 100644 --- a/tests/src/automation/dkim.rs +++ b/tests/src/automation/dkim.rs @@ -30,9 +30,8 @@ pub async fn test(test: &TestServer) { // Create test In Memory DNS servers let dns_server_id = account .registry_create_object(DnsServer::Cloudflare(DnsServerCloudflare { - email: "test@memory.org".to_string().into(), secret: SecretKey::Value(SecretKeyValue { - secret: "secret".into(), + secret: "test@memory.org".into(), }), description: "In-memory DNS server".to_string(), ..Default::default() diff --git a/tests/src/automation/dns.rs b/tests/src/automation/dns.rs index 22056549..41b4be98 100644 --- a/tests/src/automation/dns.rs +++ b/tests/src/automation/dns.rs @@ -87,9 +87,8 @@ pub async fn test(test: &TestServer) { // Create test In Memory DNS servers let dns_server_id = account .registry_create_object(DnsServer::Cloudflare(DnsServerCloudflare { - email: "test@memory.org".to_string().into(), secret: SecretKey::Value(SecretKeyValue { - secret: "secret".into(), + secret: "test@memory.org".into(), }), description: "In-memory DNS server".to_string(), ..Default::default()