sonarr_api_rs/models/
history_resource.rs

1/*
2 * Sonarr
3 *
4 * Sonarr API docs - The v3 API docs apply to both v3 and v4 versions of Sonarr. Some functionality may only be available in v4 of the Sonarr application.
5 *
6 * The version of the OpenAPI document: 3.0.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct HistoryResource {
16    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
17    pub id: Option<i32>,
18    #[serde(rename = "episodeId", skip_serializing_if = "Option::is_none")]
19    pub episode_id: Option<i32>,
20    #[serde(rename = "seriesId", skip_serializing_if = "Option::is_none")]
21    pub series_id: Option<i32>,
22    #[serde(rename = "sourceTitle", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
23    pub source_title: Option<Option<String>>,
24    #[serde(rename = "languages", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25    pub languages: Option<Option<Vec<models::Language>>>,
26    #[serde(rename = "quality", skip_serializing_if = "Option::is_none")]
27    pub quality: Option<Box<models::QualityModel>>,
28    #[serde(rename = "customFormats", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
29    pub custom_formats: Option<Option<Vec<models::CustomFormatResource>>>,
30    #[serde(rename = "customFormatScore", skip_serializing_if = "Option::is_none")]
31    pub custom_format_score: Option<i32>,
32    #[serde(rename = "qualityCutoffNotMet", skip_serializing_if = "Option::is_none")]
33    pub quality_cutoff_not_met: Option<bool>,
34    #[serde(rename = "date", skip_serializing_if = "Option::is_none")]
35    pub date: Option<String>,
36    #[serde(rename = "downloadId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
37    pub download_id: Option<Option<String>>,
38    #[serde(rename = "eventType", skip_serializing_if = "Option::is_none")]
39    pub event_type: Option<models::EpisodeHistoryEventType>,
40    #[serde(rename = "data", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
41    pub data: Option<Option<std::collections::HashMap<String, String>>>,
42    #[serde(rename = "episode", skip_serializing_if = "Option::is_none")]
43    pub episode: Option<Box<models::EpisodeResource>>,
44    #[serde(rename = "series", skip_serializing_if = "Option::is_none")]
45    pub series: Option<Box<models::SeriesResource>>,
46}
47
48impl HistoryResource {
49    pub fn new() -> HistoryResource {
50        HistoryResource {
51            id: None,
52            episode_id: None,
53            series_id: None,
54            source_title: None,
55            languages: None,
56            quality: None,
57            custom_formats: None,
58            custom_format_score: None,
59            quality_cutoff_not_met: None,
60            date: None,
61            download_id: None,
62            event_type: None,
63            data: None,
64            episode: None,
65            series: None,
66        }
67    }
68}
69