/*
 * Artifact Keeper API
 *
 * REST API for Artifact Keeper, an open-source universal artifact registry. Covers user management, repositories, artifacts, search, security scanning, SBOM, dependency tracking, SSO, analytics, monitoring, telemetry, lifecycle policies, plugins, edge nodes, migration, and administration. Format-specific protocol endpoints (npm, PyPI, Maven, Docker/OCI, etc.) are not included; those follow their respective upstream specifications.
 *
 * The version of the OpenAPI document: 1.0.0-a2
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// TelemetrySettings : Configuration for the telemetry data collection subsystem.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TelemetrySettings {
    /// Whether telemetry data collection is active.
    #[serde(rename = "enabled")]
    pub enabled: bool,
    /// When true, crash reports must be reviewed by an admin before submission.
    #[serde(rename = "review_before_send")]
    pub review_before_send: bool,
    /// Level of personally identifiable information scrubbing applied to telemetry data (e.g. none, basic, aggressive).
    #[serde(rename = "scrub_level")]
    pub scrub_level: String,
    /// Whether application log snippets are included in telemetry payloads.
    #[serde(rename = "include_logs")]
    pub include_logs: bool,
}

impl TelemetrySettings {
    /// Configuration for the telemetry data collection subsystem.
    pub fn new(enabled: bool, review_before_send: bool, scrub_level: String, include_logs: bool) -> TelemetrySettings {
        TelemetrySettings {
            enabled,
            review_before_send,
            scrub_level,
            include_logs,
        }
    }
}

