/*
 * Pescheck API
 *
 * Official client library for the Pescheck API (v2), generated from the OpenAPI specification. Authenticate with OAuth2 client credentials and use the checks, profiles, screenings, webhooks and divisions endpoints. See https://github.com/pescheckit/pescheck-clients for installation and usage.
 *
 * The version of the OpenAPI document: 2.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// V2ScreeningCheck : Per-screening entry: identifies a target ProfileCheck (by check_type when unambiguous, or via profile_check_id when the profile has multiple ProfileChecks of the same type) and supplies optional `config` patch + per-check `input`.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct V2ScreeningCheck {
    /// * `addresscheck` - addresscheck * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `id2check` - id2check * `integritycheck` - integritycheck * `openhealthcarecheck` - openhealthcarecheck * `qualificationcheck` - qualificationcheck * `righttoworkcheck` - righttoworkcheck * `vogcheck` - vogcheck * `watchlist2check` - watchlist2check * `watchlistcheck` - watchlistcheck * `workreferencecheck` - workreferencecheck * `worldwidecreditcheck` - worldwidecreditcheck
    #[serde(rename = "check_type")]
    pub check_type: CheckType,
    #[serde(rename = "config", skip_serializing_if = "Option::is_none")]
    pub config: Option<std::collections::HashMap<String, serde_json::Value>>,
    /// Disambiguator. Use when the profile has multiple ProfileChecks of the same check_type.
    #[serde(rename = "profile_check_id", skip_serializing_if = "Option::is_none")]
    pub profile_check_id: Option<uuid::Uuid>,
    #[serde(rename = "input", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub input: Option<Option<serde_json::Value>>,
}

impl V2ScreeningCheck {
    /// Per-screening entry: identifies a target ProfileCheck (by check_type when unambiguous, or via profile_check_id when the profile has multiple ProfileChecks of the same type) and supplies optional `config` patch + per-check `input`.
    pub fn new(check_type: CheckType) -> V2ScreeningCheck {
        V2ScreeningCheck {
            check_type,
            config: None,
            profile_check_id: None,
            input: None,
        }
    }
}
/// * `addresscheck` - addresscheck * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `id2check` - id2check * `integritycheck` - integritycheck * `openhealthcarecheck` - openhealthcarecheck * `qualificationcheck` - qualificationcheck * `righttoworkcheck` - righttoworkcheck * `vogcheck` - vogcheck * `watchlist2check` - watchlist2check * `watchlistcheck` - watchlistcheck * `workreferencecheck` - workreferencecheck * `worldwidecreditcheck` - worldwidecreditcheck
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum CheckType {
    #[serde(rename = "addresscheck")]
    Addresscheck,
    #[serde(rename = "adversemediacheck")]
    Adversemediacheck,
    #[serde(rename = "bigcheck")]
    Bigcheck,
    #[serde(rename = "criminalrecordscheck")]
    Criminalrecordscheck,
    #[serde(rename = "criminalrecordsuploadcheck")]
    Criminalrecordsuploadcheck,
    #[serde(rename = "customintegritycheck")]
    Customintegritycheck,
    #[serde(rename = "cvcheck")]
    Cvcheck,
    #[serde(rename = "edrcheck")]
    Edrcheck,
    #[serde(rename = "id2check")]
    Id2check,
    #[serde(rename = "integritycheck")]
    Integritycheck,
    #[serde(rename = "openhealthcarecheck")]
    Openhealthcarecheck,
    #[serde(rename = "qualificationcheck")]
    Qualificationcheck,
    #[serde(rename = "righttoworkcheck")]
    Righttoworkcheck,
    #[serde(rename = "vogcheck")]
    Vogcheck,
    #[serde(rename = "watchlist2check")]
    Watchlist2check,
    #[serde(rename = "watchlistcheck")]
    Watchlistcheck,
    #[serde(rename = "workreferencecheck")]
    Workreferencecheck,
    #[serde(rename = "worldwidecreditcheck")]
    Worldwidecreditcheck,
}

impl Default for CheckType {
    fn default() -> CheckType {
        Self::Addresscheck
    }
}

