use serde::{Deserialize, Serialize}; /*
                                      * Cloud DNS API
                                      *
                                      * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
                                      *
                                      * The version of the OpenAPI document: v1
                                      *
                                      * Generated by: https://openapi-generator.tech
                                      */

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct ManagedZoneDnsSecConfig {
    /// Specifies parameters for generating initial DnsKeys for this ManagedZone. Can only be changed while the state is OFF.
    #[serde(rename = "defaultKeySpecs", skip_serializing_if = "Option::is_none")]
    pub default_key_specs: Option<Vec<crate::google_rest_apis::dns_v1::models::DnsKeySpec>>,
    #[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
    pub kind: Option<String>,
    /// Specifies the mechanism for authenticated denial-of-existence responses. Can only be changed while the state is OFF.
    #[serde(rename = "nonExistence", skip_serializing_if = "Option::is_none")]
    pub non_existence: Option<NonExistence>,
    /// Specifies whether DNSSEC is enabled, and what mode it is in.
    #[serde(rename = "state", skip_serializing_if = "Option::is_none")]
    pub state: Option<State>,
}

impl ManagedZoneDnsSecConfig {
    pub fn new() -> ManagedZoneDnsSecConfig {
        ManagedZoneDnsSecConfig {
            default_key_specs: None,
            kind: None,
            non_existence: None,
            state: None,
        }
    }
}

/// Specifies the mechanism for authenticated denial-of-existence responses. Can only be changed while the state is OFF.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum NonExistence {
    #[serde(rename = "nsec")]
    Nsec,
    #[serde(rename = "nsec3")]
    Nsec3,
}

impl Default for NonExistence {
    fn default() -> NonExistence {
        Self::Nsec
    }
}
/// Specifies whether DNSSEC is enabled, and what mode it is in.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum State {
    #[serde(rename = "off")]
    Off,
    #[serde(rename = "on")]
    On,
    #[serde(rename = "transfer")]
    Transfer,
}

impl Default for State {
    fn default() -> State {
        Self::Off
    }
}
