use hard_xml::XmlWrite;
use super::episode::Episode;
#[derive(Debug, PartialEq, Eq, XmlWrite)]
#[xml(tag = "channel")]
pub struct Channel {
#[xml(flatten_text = "title")]
pub title: String,
#[xml(flatten_text = "description", cdata)]
pub description: String,
#[xml(flatten_text = "link")]
pub link: String,
#[xml(child = "image")]
pub image: Image,
#[xml(flatten_text = "itunes:author")]
pub author: String,
#[xml(flatten_text = "language")]
pub language: String,
#[xml(flatten_text = "lastBuildDate")]
pub last_build_date: String,
#[xml(flatten_text = "pubDate")]
pub pub_date: String,
#[xml(flatten_text = "category")]
pub category: String,
#[xml(flatten_text = "generator")]
pub generator: String,
#[xml(flatten_text = "itunes:explicit")]
pub explicit_content: String,
#[xml(flatten_text = "itunes:type")]
pub channel_type: String,
#[xml(child = "item")]
pub episodes: Vec<Episode>,
}
#[derive(Debug, PartialEq, Eq, XmlWrite)]
#[xml(tag = "itunes:image")]
pub struct Image {
#[xml(attr = "href")]
pub image_url: String,
}