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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct V2ScreeningCheckEntry {
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    #[serde(rename = "profile_check_id", deserialize_with = "Option::deserialize")]
    pub profile_check_id: Option<uuid::Uuid>,
    /// * `addresscheck` - addresscheck * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `focumcheck` - focumcheck * `id2check` - id2check * `idcheck` - idcheck * `integritycheck` - integritycheck * `openhealthcarecheck` - openhealthcarecheck * `permissioncheck` - permissioncheck * `pescheckadversemediacheck` - pescheckadversemediacheck * `qualificationcheck` - qualificationcheck * `righttoworkcheck` - righttoworkcheck * `vogcheck` - vogcheck * `watchlist2check` - watchlist2check * `watchlistcheck` - watchlistcheck * `workreferencecheck` - workreferencecheck * `worldwidecreditcheck` - worldwidecreditcheck
    #[serde(rename = "check_type")]
    pub check_type: CheckType,
    #[serde(rename = "display_name")]
    pub display_name: String,
    #[serde(rename = "status")]
    pub status: String,
    #[serde(rename = "config")]
    pub config: std::collections::HashMap<String, serde_json::Value>,
    #[serde(rename = "input")]
    pub input: std::collections::HashMap<String, serde_json::Value>,
    #[serde(rename = "output")]
    pub output: std::collections::HashMap<String, serde_json::Value>,
    /// Deep link to this check's candidate wizard step. Null when the check has no dedicated candidate step.
    #[serde(rename = "candidate_wizard_url", deserialize_with = "Option::deserialize")]
    pub candidate_wizard_url: Option<String>,
}

impl V2ScreeningCheckEntry {
    pub fn new(id: uuid::Uuid, profile_check_id: Option<uuid::Uuid>, check_type: CheckType, display_name: String, status: String, config: std::collections::HashMap<String, serde_json::Value>, input: std::collections::HashMap<String, serde_json::Value>, output: std::collections::HashMap<String, serde_json::Value>, candidate_wizard_url: Option<String>) -> V2ScreeningCheckEntry {
        V2ScreeningCheckEntry {
            id,
            profile_check_id,
            check_type,
            display_name,
            status,
            config,
            input,
            output,
            candidate_wizard_url,
        }
    }
}
/// * `addresscheck` - addresscheck * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `focumcheck` - focumcheck * `id2check` - id2check * `idcheck` - idcheck * `integritycheck` - integritycheck * `openhealthcarecheck` - openhealthcarecheck * `permissioncheck` - permissioncheck * `pescheckadversemediacheck` - pescheckadversemediacheck * `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 = "focumcheck")]
    Focumcheck,
    #[serde(rename = "id2check")]
    Id2check,
    #[serde(rename = "idcheck")]
    Idcheck,
    #[serde(rename = "integritycheck")]
    Integritycheck,
    #[serde(rename = "openhealthcarecheck")]
    Openhealthcarecheck,
    #[serde(rename = "permissioncheck")]
    Permissioncheck,
    #[serde(rename = "pescheckadversemediacheck")]
    Pescheckadversemediacheck,
    #[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
    }
}

