/*
 * 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 RegisterPeerRequest {
    #[serde(rename = "api_key")]
    pub api_key: String,
    #[serde(rename = "cache_size_bytes", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub cache_size_bytes: Option<Option<i64>>,
    #[serde(rename = "endpoint_url")]
    pub endpoint_url: String,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "region", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub region: Option<Option<String>>,
    #[serde(rename = "sync_filter")]
    pub sync_filter: serde_json::Value,
}

impl RegisterPeerRequest {
    pub fn new(api_key: String, endpoint_url: String, name: String, sync_filter: serde_json::Value) -> RegisterPeerRequest {
        RegisterPeerRequest {
            api_key,
            cache_size_bytes: None,
            endpoint_url,
            name,
            region: None,
            sync_filter,
        }
    }
}

