use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Copy, PartialEq, Eq, Default, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum RuntimeNearCityAcquisitionValueProvenance {
    Grounded,
    #[default]
    BestEffortGuess,
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct RuntimeNearCityAcquisitionRegion {
    pub region_id: u32,
    pub name: String,
    #[serde(default)]
    pub profile_names: Vec<String>,
    #[serde(default)]
    pub fixed_row_shape_family_signature: Option<String>,
    #[serde(default)]
    pub fixed_row_best_density_lane_relative_offset_hex: Option<String>,
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct RuntimeNearCityAcquisitionSite {
    pub site_id: u32,
    pub primary_name: String,
    pub secondary_name: String,
    #[serde(default)]
    pub region_id: Option<u32>,
    #[serde(default)]
    pub owner_company_id: Option<u32>,
    #[serde(default)]
    pub preferred_company_id: Option<u32>,
    #[serde(default)]
    pub owner_company_id_provenance: RuntimeNearCityAcquisitionValueProvenance,
    pub self_id: u32,
    #[serde(default)]
    pub self_id_provenance: RuntimeNearCityAcquisitionValueProvenance,
    pub candidate_subtype_label: String,
    #[serde(default)]
    pub candidate_subtype_provenance: RuntimeNearCityAcquisitionValueProvenance,
    #[serde(default)]
    pub cached_tri_lane_0: u32,
    #[serde(default)]
    pub cached_tri_lane_1: u32,
    #[serde(default)]
    pub cached_tri_lane_2: u32,
    #[serde(default)]
    pub cached_tri_lane_provenance: RuntimeNearCityAcquisitionValueProvenance,
    #[serde(default)]
    pub nontransport_source_label: String,
    #[serde(default)]
    pub tri_lane_source_label: String,
}
