/*
 * Hetzner Cloud API
 *
 * Copied from the official API documentation for the Public Hetzner Cloud.
 *
 * The version of the OpenAPI document: 4b3f595
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// ResourceRecordSetType : Type of the RRSet.
/// Type of the RRSet.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ResourceRecordSetType {
    #[serde(rename = "A")]
    A,
    #[serde(rename = "AAAA")]
    Aaaa,
    #[serde(rename = "CAA")]
    Caa,
    #[serde(rename = "CNAME")]
    Cname,
    #[serde(rename = "DS")]
    Ds,
    #[serde(rename = "HINFO")]
    Hinfo,
    #[serde(rename = "HTTPS")]
    Https,
    #[serde(rename = "MX")]
    Mx,
    #[serde(rename = "NS")]
    Ns,
    #[serde(rename = "PTR")]
    Ptr,
    #[serde(rename = "RP")]
    Rp,
    #[serde(rename = "SOA")]
    Soa,
    #[serde(rename = "SRV")]
    Srv,
    #[serde(rename = "SVCB")]
    Svcb,
    #[serde(rename = "TLSA")]
    Tlsa,
    #[serde(rename = "TXT")]
    Txt,
}

impl std::fmt::Display for ResourceRecordSetType {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::A => write!(f, "A"),
            Self::Aaaa => write!(f, "AAAA"),
            Self::Caa => write!(f, "CAA"),
            Self::Cname => write!(f, "CNAME"),
            Self::Ds => write!(f, "DS"),
            Self::Hinfo => write!(f, "HINFO"),
            Self::Https => write!(f, "HTTPS"),
            Self::Mx => write!(f, "MX"),
            Self::Ns => write!(f, "NS"),
            Self::Ptr => write!(f, "PTR"),
            Self::Rp => write!(f, "RP"),
            Self::Soa => write!(f, "SOA"),
            Self::Srv => write!(f, "SRV"),
            Self::Svcb => write!(f, "SVCB"),
            Self::Tlsa => write!(f, "TLSA"),
            Self::Txt => write!(f, "TXT"),
        }
    }
}

impl Default for ResourceRecordSetType {
    fn default() -> ResourceRecordSetType {
        Self::A
    }
}
