diff --git a/cloudflare/src/endpoints/dns.rs b/cloudflare/src/endpoints/dns.rs index 6f099976..72244f78 100644 --- a/cloudflare/src/endpoints/dns.rs +++ b/cloudflare/src/endpoints/dns.rs @@ -136,7 +136,7 @@ pub enum ListDnsRecordsOrder { #[derive(Serialize, Clone, Debug, Default)] pub struct ListDnsRecordsParams { #[serde(flatten)] - pub record_type: Option, + pub record_type: Option, pub name: Option, pub page: Option, pub per_page: Option, @@ -169,6 +169,21 @@ pub enum DnsContent { SRV { content: String }, } +/// Type of the DNS record, along with a optional value +/// Similar to [`DnsContent`], but is only used in [`ListDnsRecordsParams`] +#[serde_with::skip_serializing_none] +#[derive(Serialize, Clone, Debug)] +#[serde(tag = "type")] +pub enum DnsRecordTypeWithOptionalContent { + A { content: Option }, + AAAA { content: Option }, + CNAME { content: Option }, + NS { content: Option }, + MX { content: Option }, + TXT { content: Option }, + SRV { content: Option }, +} + #[derive(Deserialize, Debug)] pub struct DeleteDnsRecordResponse { /// DNS record identifier tag