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

/// V2ProfileCheck : Input serializer for one `{check_type, config}` profile-check entry.  Used by profile create directly. Subclass with `PARTIAL_CONFIG = True` for screening overrides where only the fields actually being changed should be validated.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct V2ProfileCheck {
    /// * `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>>,
}

impl V2ProfileCheck {
    /// Input serializer for one `{check_type, config}` profile-check entry.  Used by profile create directly. Subclass with `PARTIAL_CONFIG = True` for screening overrides where only the fields actually being changed should be validated.
    pub fn new(check_type: CheckType) -> V2ProfileCheck {
        V2ProfileCheck {
            check_type,
            config: 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
    }
}

