use serde::{Deserialize, Serialize};
use std::collections::HashSet;

#[derive(Debug, Clone, Deserialize, PartialEq, Eq, Serialize)]
pub struct Audio {
    #[serde(default)]
    #[serde(skip_serializing_if = "HashSet::is_empty")]
    pub ids: HashSet<String>,
    pub url: String,
    #[serde(default)]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub author: Option<String>,
    #[serde(default)]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub title: Option<String>,
}
