/*
 * Artifact Keeper API
 *
 * REST API for Artifact Keeper, an open-source universal artifact registry. Covers user management, repositories, artifacts, search, security scanning, SBOM, dependency tracking, SSO, analytics, monitoring, telemetry, lifecycle policies, plugins, edge nodes, migration, and administration. Format-specific protocol endpoints (npm, PyPI, Maven, Docker/OCI, etc.) are not included; those follow their respective upstream specifications.
 *
 * The version of the OpenAPI document: 1.0.0-a2
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct MigrationConnection {
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "url")]
    pub url: String,
    #[serde(rename = "username")]
    pub username: String,
    #[serde(rename = "type")]
    pub r#type: Type,
    #[serde(rename = "verified")]
    pub verified: bool,
    #[serde(rename = "created_at")]
    pub created_at: String,
}

impl MigrationConnection {
    pub fn new(id: uuid::Uuid, name: String, url: String, username: String, r#type: Type, verified: bool, created_at: String) -> MigrationConnection {
        MigrationConnection {
            id,
            name,
            url,
            username,
            r#type,
            verified,
            created_at,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "artifactory")]
    Artifactory,
    #[serde(rename = "nexus")]
    Nexus,
}

impl Default for Type {
    fn default() -> Type {
        Self::Artifactory
    }
}

