use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ReleaseResource {
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<i32>,
#[serde(rename = "guid", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub guid: Option<Option<String>>,
#[serde(rename = "age", skip_serializing_if = "Option::is_none")]
pub age: Option<i32>,
#[serde(rename = "ageHours", skip_serializing_if = "Option::is_none")]
pub age_hours: Option<f64>,
#[serde(rename = "ageMinutes", skip_serializing_if = "Option::is_none")]
pub age_minutes: Option<f64>,
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
pub size: Option<i64>,
#[serde(rename = "files", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub files: Option<Option<i32>>,
#[serde(rename = "grabs", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub grabs: Option<Option<i32>>,
#[serde(rename = "indexerId", skip_serializing_if = "Option::is_none")]
pub indexer_id: Option<i32>,
#[serde(rename = "indexer", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub indexer: Option<Option<String>>,
#[serde(rename = "subGroup", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub sub_group: Option<Option<String>>,
#[serde(rename = "releaseHash", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub release_hash: Option<Option<String>>,
#[serde(rename = "title", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub title: Option<Option<String>>,
#[serde(rename = "sortTitle", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub sort_title: Option<Option<String>>,
#[serde(rename = "imdbId", skip_serializing_if = "Option::is_none")]
pub imdb_id: Option<i32>,
#[serde(rename = "tmdbId", skip_serializing_if = "Option::is_none")]
pub tmdb_id: Option<i32>,
#[serde(rename = "tvdbId", skip_serializing_if = "Option::is_none")]
pub tvdb_id: Option<i32>,
#[serde(rename = "tvMazeId", skip_serializing_if = "Option::is_none")]
pub tv_maze_id: Option<i32>,
#[serde(rename = "publishDate", skip_serializing_if = "Option::is_none")]
pub publish_date: Option<String>,
#[serde(rename = "commentUrl", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub comment_url: Option<Option<String>>,
#[serde(rename = "downloadUrl", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub download_url: Option<Option<String>>,
#[serde(rename = "infoUrl", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub info_url: Option<Option<String>>,
#[serde(rename = "posterUrl", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub poster_url: Option<Option<String>>,
#[serde(rename = "indexerFlags", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub indexer_flags: Option<Option<Vec<String>>>,
#[serde(rename = "categories", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub categories: Option<Option<Vec<models::IndexerCategory>>>,
#[serde(rename = "magnetUrl", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub magnet_url: Option<Option<String>>,
#[serde(rename = "infoHash", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub info_hash: Option<Option<String>>,
#[serde(rename = "seeders", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub seeders: Option<Option<i32>>,
#[serde(rename = "leechers", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub leechers: Option<Option<i32>>,
#[serde(rename = "protocol", skip_serializing_if = "Option::is_none")]
pub protocol: Option<models::DownloadProtocol>,
#[serde(rename = "fileName", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub file_name: Option<Option<String>>,
#[serde(rename = "downloadClientId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub download_client_id: Option<Option<i32>>,
}
impl ReleaseResource {
pub fn new() -> ReleaseResource {
ReleaseResource {
id: None,
guid: None,
age: None,
age_hours: None,
age_minutes: None,
size: None,
files: None,
grabs: None,
indexer_id: None,
indexer: None,
sub_group: None,
release_hash: None,
title: None,
sort_title: None,
imdb_id: None,
tmdb_id: None,
tvdb_id: None,
tv_maze_id: None,
publish_date: None,
comment_url: None,
download_url: None,
info_url: None,
poster_url: None,
indexer_flags: None,
categories: None,
magnet_url: None,
info_hash: None,
seeders: None,
leechers: None,
protocol: None,
file_name: None,
download_client_id: None,
}
}
}