sonarr_api_rs/models/
episode_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 EpisodeResource {
16    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
17    pub id: Option<i32>,
18    #[serde(rename = "seriesId", skip_serializing_if = "Option::is_none")]
19    pub series_id: Option<i32>,
20    #[serde(rename = "tvdbId", skip_serializing_if = "Option::is_none")]
21    pub tvdb_id: Option<i32>,
22    #[serde(rename = "episodeFileId", skip_serializing_if = "Option::is_none")]
23    pub episode_file_id: Option<i32>,
24    #[serde(rename = "seasonNumber", skip_serializing_if = "Option::is_none")]
25    pub season_number: Option<i32>,
26    #[serde(rename = "episodeNumber", skip_serializing_if = "Option::is_none")]
27    pub episode_number: Option<i32>,
28    #[serde(rename = "title", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
29    pub title: Option<Option<String>>,
30    #[serde(rename = "airDate", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
31    pub air_date: Option<Option<String>>,
32    #[serde(rename = "airDateUtc", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
33    pub air_date_utc: Option<Option<String>>,
34    #[serde(rename = "runtime", skip_serializing_if = "Option::is_none")]
35    pub runtime: Option<i32>,
36    #[serde(rename = "finaleType", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
37    pub finale_type: Option<Option<String>>,
38    #[serde(rename = "overview", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
39    pub overview: Option<Option<String>>,
40    #[serde(rename = "episodeFile", skip_serializing_if = "Option::is_none")]
41    pub episode_file: Option<Box<models::EpisodeFileResource>>,
42    #[serde(rename = "hasFile", skip_serializing_if = "Option::is_none")]
43    pub has_file: Option<bool>,
44    #[serde(rename = "monitored", skip_serializing_if = "Option::is_none")]
45    pub monitored: Option<bool>,
46    #[serde(rename = "absoluteEpisodeNumber", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
47    pub absolute_episode_number: Option<Option<i32>>,
48    #[serde(rename = "sceneAbsoluteEpisodeNumber", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
49    pub scene_absolute_episode_number: Option<Option<i32>>,
50    #[serde(rename = "sceneEpisodeNumber", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
51    pub scene_episode_number: Option<Option<i32>>,
52    #[serde(rename = "sceneSeasonNumber", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
53    pub scene_season_number: Option<Option<i32>>,
54    #[serde(rename = "unverifiedSceneNumbering", skip_serializing_if = "Option::is_none")]
55    pub unverified_scene_numbering: Option<bool>,
56    #[serde(rename = "endTime", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
57    pub end_time: Option<Option<String>>,
58    #[serde(rename = "grabDate", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
59    pub grab_date: Option<Option<String>>,
60    #[serde(rename = "series", skip_serializing_if = "Option::is_none")]
61    pub series: Option<Box<models::SeriesResource>>,
62    #[serde(rename = "images", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
63    pub images: Option<Option<Vec<models::MediaCover>>>,
64}
65
66impl EpisodeResource {
67    pub fn new() -> EpisodeResource {
68        EpisodeResource {
69            id: None,
70            series_id: None,
71            tvdb_id: None,
72            episode_file_id: None,
73            season_number: None,
74            episode_number: None,
75            title: None,
76            air_date: None,
77            air_date_utc: None,
78            runtime: None,
79            finale_type: None,
80            overview: None,
81            episode_file: None,
82            has_file: None,
83            monitored: None,
84            absolute_episode_number: None,
85            scene_absolute_episode_number: None,
86            scene_episode_number: None,
87            scene_season_number: None,
88            unverified_scene_numbering: None,
89            end_time: None,
90            grab_date: None,
91            series: None,
92            images: None,
93        }
94    }
95}
96