/*
 * 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 AssignRepoRequest {
    #[serde(rename = "replication_mode", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub replication_mode: Option<Option<String>>,
    #[serde(rename = "replication_schedule", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub replication_schedule: Option<Option<String>>,
    #[serde(rename = "repository_id")]
    pub repository_id: uuid::Uuid,
    #[serde(rename = "sync_enabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub sync_enabled: Option<Option<bool>>,
}

impl AssignRepoRequest {
    pub fn new(repository_id: uuid::Uuid) -> AssignRepoRequest {
        AssignRepoRequest {
            replication_mode: None,
            replication_schedule: None,
            repository_id,
            sync_enabled: None,
        }
    }
}

