/*
 * 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 CreateRepositoryRequest {
    #[serde(rename = "key")]
    pub key: String,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "format")]
    pub format: Format,
    #[serde(rename = "type")]
    pub r#type: Type,
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "is_public", skip_serializing_if = "Option::is_none")]
    pub is_public: Option<bool>,
}

impl CreateRepositoryRequest {
    pub fn new(key: String, name: String, format: Format, r#type: Type) -> CreateRepositoryRequest {
        CreateRepositoryRequest {
            key,
            name,
            format,
            r#type,
            description: None,
            is_public: None,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Format {
    #[serde(rename = "maven")]
    Maven,
    #[serde(rename = "npm")]
    Npm,
    #[serde(rename = "pypi")]
    Pypi,
    #[serde(rename = "docker")]
    Docker,
    #[serde(rename = "cargo")]
    Cargo,
    #[serde(rename = "nuget")]
    Nuget,
    #[serde(rename = "go")]
    Go,
    #[serde(rename = "helm")]
    Helm,
    #[serde(rename = "generic")]
    Generic,
}

impl Default for Format {
    fn default() -> Format {
        Self::Maven
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "local")]
    Local,
    #[serde(rename = "remote")]
    Remote,
    #[serde(rename = "virtual")]
    Virtual,
}

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

