//! FDA API response types.

use serde::Deserialize;

#[derive(Debug, Deserialize)]
pub struct FdaLabelResponse {
    #[allow(dead_code)]
    pub meta: Option<FdaMeta>,
    pub results: Vec<FdaLabel>,
}

#[derive(Debug, Deserialize)]
#[allow(dead_code)]
pub struct FdaMeta {
    pub results: Option<FdaMetaResults>,
}

#[derive(Debug, Deserialize)]
#[allow(dead_code)]
pub struct FdaMetaResults {
    pub total: Option<u64>,
}

#[derive(Debug, Deserialize)]
pub struct FdaLabel {
    pub openfda: Option<OpenFda>,
    pub boxed_warning: Option<Vec<String>>,
    pub adverse_reactions: Option<Vec<String>>,
    pub indications_and_usage: Option<Vec<String>>,
    pub dosage_and_administration: Option<Vec<String>>,
    // Additional fields for future use
    #[allow(dead_code)]
    pub warnings_and_precautions: Option<Vec<String>>,
    #[allow(dead_code)]
    pub contraindications: Option<Vec<String>>,
    #[allow(dead_code)]
    pub drug_interactions: Option<Vec<String>>,
    #[allow(dead_code)]
    pub clinical_pharmacology: Option<Vec<String>>,
    #[allow(dead_code)]
    pub effective_time: Option<String>,
}

#[derive(Debug, Deserialize)]
pub struct OpenFda {
    pub generic_name: Option<Vec<String>>,
    // Additional fields for future use
    #[allow(dead_code)]
    pub brand_name: Option<Vec<String>>,
    #[allow(dead_code)]
    pub manufacturer_name: Option<Vec<String>>,
    #[allow(dead_code)]
    pub application_number: Option<Vec<String>>,
    #[allow(dead_code)]
    pub product_ndc: Option<Vec<String>>,
    #[allow(dead_code)]
    pub route: Option<Vec<String>>,
    #[allow(dead_code)]
    pub substance_name: Option<Vec<String>>,
}
