1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
use serde_derive::Deserialize; #[derive(Deserialize, Debug)] pub struct ContentProvider { #[serde(flatten)] pub r#type: ContentProviderType, } #[derive(Deserialize, Debug)] #[serde(tag = "type")] pub enum ContentProviderType { #[serde(rename = "external")] External(External), #[serde(other)] Other, } #[derive(Deserialize, Debug)] pub struct External { #[serde(rename = "originalContentUrl")] pub original_content_url: String, #[serde(rename = "previewImageUrl")] pub preview_image_url: String, }