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

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SyncPolicyResponse {
    #[serde(rename = "artifact_filter")]
    pub artifact_filter: serde_json::Value,
    #[serde(rename = "created_at")]
    pub created_at: String,
    #[serde(rename = "description")]
    pub description: String,
    #[serde(rename = "enabled")]
    pub enabled: bool,
    /// Convenience glob filter, mirrored from `artifact_filter.include_paths`. Round-trips the single-pattern shorthand accepted on create (e.g. `\"*.tar.gz\"`). Empty when no include pattern is set.
    #[serde(rename = "filter")]
    pub filter: String,
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "peer_selector")]
    pub peer_selector: serde_json::Value,
    #[serde(rename = "precedence")]
    pub precedence: i32,
    #[serde(rename = "priority")]
    pub priority: i32,
    #[serde(rename = "replication_mode")]
    pub replication_mode: String,
    #[serde(rename = "repo_selector")]
    pub repo_selector: serde_json::Value,
    #[serde(rename = "updated_at")]
    pub updated_at: String,
}

impl SyncPolicyResponse {
    pub fn new(artifact_filter: serde_json::Value, created_at: String, description: String, enabled: bool, filter: String, id: uuid::Uuid, name: String, peer_selector: serde_json::Value, precedence: i32, priority: i32, replication_mode: String, repo_selector: serde_json::Value, updated_at: String) -> SyncPolicyResponse {
        SyncPolicyResponse {
            artifact_filter,
            created_at,
            description,
            enabled,
            filter,
            id,
            name,
            peer_selector,
            precedence,
            priority,
            replication_mode,
            repo_selector,
            updated_at,
        }
    }
}

