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

/// UpsertScanConfigRequest : Request to create or update a scan configuration.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UpsertScanConfigRequest {
    #[serde(rename = "block_on_policy_violation")]
    pub block_on_policy_violation: bool,
    #[serde(rename = "scan_enabled")]
    pub scan_enabled: bool,
    #[serde(rename = "scan_on_proxy")]
    pub scan_on_proxy: bool,
    #[serde(rename = "scan_on_upload")]
    pub scan_on_upload: bool,
    #[serde(rename = "severity_threshold")]
    pub severity_threshold: String,
}

impl UpsertScanConfigRequest {
    /// Request to create or update a scan configuration.
    pub fn new(block_on_policy_violation: bool, scan_enabled: bool, scan_on_proxy: bool, scan_on_upload: bool, severity_threshold: String) -> UpsertScanConfigRequest {
        UpsertScanConfigRequest {
            block_on_policy_violation,
            scan_enabled,
            scan_on_proxy,
            scan_on_upload,
            severity_threshold,
        }
    }
}

