sonarr_api_rs/models/
series_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 SeriesResource {
16    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
17    pub id: Option<i32>,
18    #[serde(rename = "title", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
19    pub title: Option<Option<String>>,
20    #[serde(rename = "alternateTitles", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
21    pub alternate_titles: Option<Option<Vec<models::AlternateTitleResource>>>,
22    #[serde(rename = "sortTitle", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
23    pub sort_title: Option<Option<String>>,
24    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
25    pub status: Option<models::SeriesStatusType>,
26    #[serde(rename = "ended", skip_serializing_if = "Option::is_none")]
27    pub ended: Option<bool>,
28    #[serde(rename = "profileName", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
29    pub profile_name: Option<Option<String>>,
30    #[serde(rename = "overview", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
31    pub overview: Option<Option<String>>,
32    #[serde(rename = "nextAiring", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
33    pub next_airing: Option<Option<String>>,
34    #[serde(rename = "previousAiring", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
35    pub previous_airing: Option<Option<String>>,
36    #[serde(rename = "network", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
37    pub network: Option<Option<String>>,
38    #[serde(rename = "airTime", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
39    pub air_time: Option<Option<String>>,
40    #[serde(rename = "images", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
41    pub images: Option<Option<Vec<models::MediaCover>>>,
42    #[serde(rename = "originalLanguage", skip_serializing_if = "Option::is_none")]
43    pub original_language: Option<Box<models::Language>>,
44    #[serde(rename = "remotePoster", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
45    pub remote_poster: Option<Option<String>>,
46    #[serde(rename = "seasons", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
47    pub seasons: Option<Option<Vec<models::SeasonResource>>>,
48    #[serde(rename = "year", skip_serializing_if = "Option::is_none")]
49    pub year: Option<i32>,
50    #[serde(rename = "path", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
51    pub path: Option<Option<String>>,
52    #[serde(rename = "qualityProfileId", skip_serializing_if = "Option::is_none")]
53    pub quality_profile_id: Option<i32>,
54    #[serde(rename = "seasonFolder", skip_serializing_if = "Option::is_none")]
55    pub season_folder: Option<bool>,
56    #[serde(rename = "monitored", skip_serializing_if = "Option::is_none")]
57    pub monitored: Option<bool>,
58    #[serde(rename = "monitorNewItems", skip_serializing_if = "Option::is_none")]
59    pub monitor_new_items: Option<models::NewItemMonitorTypes>,
60    #[serde(rename = "useSceneNumbering", skip_serializing_if = "Option::is_none")]
61    pub use_scene_numbering: Option<bool>,
62    #[serde(rename = "runtime", skip_serializing_if = "Option::is_none")]
63    pub runtime: Option<i32>,
64    #[serde(rename = "tvdbId", skip_serializing_if = "Option::is_none")]
65    pub tvdb_id: Option<i32>,
66    #[serde(rename = "tvRageId", skip_serializing_if = "Option::is_none")]
67    pub tv_rage_id: Option<i32>,
68    #[serde(rename = "tvMazeId", skip_serializing_if = "Option::is_none")]
69    pub tv_maze_id: Option<i32>,
70    #[serde(rename = "tmdbId", skip_serializing_if = "Option::is_none")]
71    pub tmdb_id: Option<i32>,
72    #[serde(rename = "firstAired", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
73    pub first_aired: Option<Option<String>>,
74    #[serde(rename = "lastAired", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
75    pub last_aired: Option<Option<String>>,
76    #[serde(rename = "seriesType", skip_serializing_if = "Option::is_none")]
77    pub series_type: Option<models::SeriesTypes>,
78    #[serde(rename = "cleanTitle", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
79    pub clean_title: Option<Option<String>>,
80    #[serde(rename = "imdbId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
81    pub imdb_id: Option<Option<String>>,
82    #[serde(rename = "titleSlug", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
83    pub title_slug: Option<Option<String>>,
84    #[serde(rename = "rootFolderPath", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
85    pub root_folder_path: Option<Option<String>>,
86    #[serde(rename = "folder", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
87    pub folder: Option<Option<String>>,
88    #[serde(rename = "certification", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
89    pub certification: Option<Option<String>>,
90    #[serde(rename = "genres", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
91    pub genres: Option<Option<Vec<String>>>,
92    #[serde(rename = "tags", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
93    pub tags: Option<Option<Vec<i32>>>,
94    #[serde(rename = "added", skip_serializing_if = "Option::is_none")]
95    pub added: Option<String>,
96    #[serde(rename = "addOptions", skip_serializing_if = "Option::is_none")]
97    pub add_options: Option<Box<models::AddSeriesOptions>>,
98    #[serde(rename = "ratings", skip_serializing_if = "Option::is_none")]
99    pub ratings: Option<Box<models::Ratings>>,
100    #[serde(rename = "statistics", skip_serializing_if = "Option::is_none")]
101    pub statistics: Option<Box<models::SeriesStatisticsResource>>,
102    #[serde(rename = "episodesChanged", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
103    pub episodes_changed: Option<Option<bool>>,
104    #[serde(rename = "languageProfileId", skip_serializing_if = "Option::is_none")]
105    pub language_profile_id: Option<i32>,
106}
107
108impl SeriesResource {
109    pub fn new() -> SeriesResource {
110        SeriesResource {
111            id: None,
112            title: None,
113            alternate_titles: None,
114            sort_title: None,
115            status: None,
116            ended: None,
117            profile_name: None,
118            overview: None,
119            next_airing: None,
120            previous_airing: None,
121            network: None,
122            air_time: None,
123            images: None,
124            original_language: None,
125            remote_poster: None,
126            seasons: None,
127            year: None,
128            path: None,
129            quality_profile_id: None,
130            season_folder: None,
131            monitored: None,
132            monitor_new_items: None,
133            use_scene_numbering: None,
134            runtime: None,
135            tvdb_id: None,
136            tv_rage_id: None,
137            tv_maze_id: None,
138            tmdb_id: None,
139            first_aired: None,
140            last_aired: None,
141            series_type: None,
142            clean_title: None,
143            imdb_id: None,
144            title_slug: None,
145            root_folder_path: None,
146            folder: None,
147            certification: None,
148            genres: None,
149            tags: None,
150            added: None,
151            add_options: None,
152            ratings: None,
153            statistics: None,
154            episodes_changed: None,
155            language_profile_id: None,
156        }
157    }
158}
159