/*
 * Artifact Keeper API
 *
 * Enterprise artifact registry supporting 45+ package formats.
 *
 * The version of the OpenAPI document: 1.0.0-rc.3
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ConnectionResponse {
    #[serde(rename = "auth_type")]
    pub auth_type: String,
    #[serde(rename = "created_at")]
    pub created_at: String,
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "source_type")]
    pub source_type: String,
    #[serde(rename = "url")]
    pub url: String,
    #[serde(rename = "verified_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub verified_at: Option<Option<String>>,
}

impl ConnectionResponse {
    pub fn new(auth_type: String, created_at: String, id: uuid::Uuid, name: String, source_type: String, url: String) -> ConnectionResponse {
        ConnectionResponse {
            auth_type,
            created_at,
            id,
            name,
            source_type,
            url,
            verified_at: None,
        }
    }
}

