/*
 * 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};

/// TestFormatRequest : Request for testing a format handler
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TestFormatRequest {
    /// Whether content is base64 encoded
    #[serde(rename = "base64", skip_serializing_if = "Option::is_none")]
    pub base64: Option<bool>,
    /// Base64-encoded content to test, or raw string content
    #[serde(rename = "content")]
    pub content: String,
    /// Path to simulate for the artifact
    #[serde(rename = "path")]
    pub path: String,
}

impl TestFormatRequest {
    /// Request for testing a format handler
    pub fn new(content: String, path: String) -> TestFormatRequest {
        TestFormatRequest {
            base64: None,
            content,
            path,
        }
    }
}

