use serde::{Deserialize, Serialize}; /*
                                      * Cloud SQL Admin API
                                      *
                                      * API for Cloud SQL database instance management
                                      *
                                      * The version of the OpenAPI document: v1
                                      *
                                      * Generated by: https://openapi-generator.tech
                                      */

use crate::google_rest_apis::sqladmin_v1::models;

/// SslCert : SslCerts Resource
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SslCert {
    /// PEM representation.
    #[serde(rename = "cert", skip_serializing_if = "Option::is_none")]
    pub cert: Option<String>,
    /// Serial number, as extracted from the certificate.
    #[serde(rename = "certSerialNumber", skip_serializing_if = "Option::is_none")]
    pub cert_serial_number: Option<String>,
    /// User supplied name. Constrained to [a-zA-Z.-_ ]+.
    #[serde(rename = "commonName", skip_serializing_if = "Option::is_none")]
    pub common_name: Option<String>,
    /// The time when the certificate was created in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`
    #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")]
    pub create_time: Option<String>,
    /// The time when the certificate expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.
    #[serde(rename = "expirationTime", skip_serializing_if = "Option::is_none")]
    pub expiration_time: Option<String>,
    /// Name of the database instance.
    #[serde(rename = "instance", skip_serializing_if = "Option::is_none")]
    pub instance: Option<String>,
    /// This is always `sql#sslCert`.
    #[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
    pub kind: Option<String>,
    /// The URI of this resource.
    #[serde(rename = "selfLink", skip_serializing_if = "Option::is_none")]
    pub self_link: Option<String>,
    /// Sha1 Fingerprint.
    #[serde(rename = "sha1Fingerprint", skip_serializing_if = "Option::is_none")]
    pub sha1_fingerprint: Option<String>,
}

impl SslCert {
    /// SslCerts Resource
    pub fn new() -> SslCert {
        SslCert {
            cert: None,
            cert_serial_number: None,
            common_name: None,
            create_time: None,
            expiration_time: None,
            instance: None,
            kind: None,
            self_link: None,
            sha1_fingerprint: None,
        }
    }
}
