/*
 * 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 ApprovalRequest {
    /// Artifact ID to promote
    #[serde(rename = "artifact_id")]
    pub artifact_id: uuid::Uuid,
    /// Free-text justification
    #[serde(rename = "notes", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub notes: Option<Option<String>>,
    /// Skip policy evaluation
    #[serde(rename = "skip_policy_check", skip_serializing_if = "Option::is_none")]
    pub skip_policy_check: Option<bool>,
    /// Source staging repository key
    #[serde(rename = "source_repository")]
    pub source_repository: String,
    /// Target release repository key
    #[serde(rename = "target_repository")]
    pub target_repository: String,
}

impl ApprovalRequest {
    pub fn new(artifact_id: uuid::Uuid, source_repository: String, target_repository: String) -> ApprovalRequest {
        ApprovalRequest {
            artifact_id,
            notes: None,
            skip_policy_check: None,
            source_repository,
            target_repository,
        }
    }
}

