use serde::Deserialize;
pub(super) enum ListFileContent {
Simple(ListFileContentSimple),
V1(ListFileContentV1),
}
impl From<ListFileContentSimple> for ListFileContent {
fn from(value: ListFileContentSimple) -> Self {
Self::Simple(value)
}
}
impl From<ListFileContentV1> for ListFileContent {
fn from(value: ListFileContentV1) -> Self {
Self::V1(value)
}
}
#[derive(Deserialize, Debug)]
pub(super) struct ListFileContentSimple(pub(super) Vec<String>);
#[derive(Deserialize, Debug)]
pub(super) struct ListFileContentV1 {
#[serde(rename = "remoteLists")]
pub(super) lists: Option<Vec<String>>,
#[serde(rename = "remoteManifests")]
pub(super) manifests: Option<Vec<String>>,
#[serde(rename = "remoteManifestRepos")]
pub(super) manifest_repos: Option<Vec<Repo>>,
}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub(super) struct Repo {
repo_fetch_url: String,
r#ref: String,
}