use serde::{Deserialize, Serialize}; /*
                                      * Compute Engine API
                                      *
                                      * Creates and runs virtual machines on Google Cloud Platform.
                                      *
                                      * The version of the OpenAPI document: v1
                                      *
                                      * Generated by: https://openapi-generator.tech
                                      */

/// SslCertificateManagedSslCertificate : Configuration and status of a managed SSL certificate.

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct SslCertificateManagedSslCertificate {
    /// [Output only] Detailed statuses of the domains specified for managed certificate resource.
    #[serde(rename = "domainStatus", skip_serializing_if = "Option::is_none")]
    pub domain_status: Option<DomainStatus>,
    /// The domains for which a managed SSL certificate will be generated. Each Google-managed SSL certificate supports up to the [maximum number of domains per Google-managed SSL certificate](/load-balancing/docs/quotas#ssl_certificates).
    #[serde(rename = "domains", skip_serializing_if = "Option::is_none")]
    pub domains: Option<Vec<String>>,
    /// [Output only] Status of the managed certificate resource.
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<Status>,
}

impl SslCertificateManagedSslCertificate {
    /// Configuration and status of a managed SSL certificate.
    pub fn new() -> SslCertificateManagedSslCertificate {
        SslCertificateManagedSslCertificate {
            domain_status: None,
            domains: None,
            status: None,
        }
    }
}

/// [Output only] Detailed statuses of the domains specified for managed certificate resource.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum DomainStatus {
    #[serde(rename = "ACTIVE")]
    Active,
    #[serde(rename = "DOMAIN_STATUS_UNSPECIFIED")]
    DomainStatusUnspecified,
    #[serde(rename = "FAILED_CAA_CHECKING")]
    FailedCaaChecking,
    #[serde(rename = "FAILED_CAA_FORBIDDEN")]
    FailedCaaForbidden,
    #[serde(rename = "FAILED_NOT_VISIBLE")]
    FailedNotVisible,
    #[serde(rename = "FAILED_RATE_LIMITED")]
    FailedRateLimited,
    #[serde(rename = "PROVISIONING")]
    Provisioning,
}

impl Default for DomainStatus {
    fn default() -> DomainStatus {
        Self::Active
    }
}
/// [Output only] Status of the managed certificate resource.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "ACTIVE")]
    Active,
    #[serde(rename = "MANAGED_CERTIFICATE_STATUS_UNSPECIFIED")]
    ManagedCertificateStatusUnspecified,
    #[serde(rename = "PROVISIONING")]
    Provisioning,
    #[serde(rename = "PROVISIONING_FAILED")]
    ProvisioningFailed,
    #[serde(rename = "PROVISIONING_FAILED_PERMANENTLY")]
    ProvisioningFailedPermanently,
    #[serde(rename = "RENEWAL_FAILED")]
    RenewalFailed,
}

impl Default for Status {
    fn default() -> Status {
        Self::Active
    }
}
