use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BookResource {
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<i32>,
#[serde(rename = "title", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub title: Option<Option<String>>,
#[serde(rename = "authorTitle", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub author_title: Option<Option<String>>,
#[serde(rename = "seriesTitle", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub series_title: Option<Option<String>>,
#[serde(rename = "disambiguation", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub disambiguation: Option<Option<String>>,
#[serde(rename = "overview", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub overview: Option<Option<String>>,
#[serde(rename = "authorId", skip_serializing_if = "Option::is_none")]
pub author_id: Option<i32>,
#[serde(rename = "foreignBookId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub foreign_book_id: Option<Option<String>>,
#[serde(rename = "foreignEditionId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub foreign_edition_id: Option<Option<String>>,
#[serde(rename = "titleSlug", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub title_slug: Option<Option<String>>,
#[serde(rename = "monitored", skip_serializing_if = "Option::is_none")]
pub monitored: Option<bool>,
#[serde(rename = "anyEditionOk", skip_serializing_if = "Option::is_none")]
pub any_edition_ok: Option<bool>,
#[serde(rename = "ratings", skip_serializing_if = "Option::is_none")]
pub ratings: Option<Box<models::Ratings>>,
#[serde(rename = "releaseDate", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub release_date: Option<Option<String>>,
#[serde(rename = "pageCount", skip_serializing_if = "Option::is_none")]
pub page_count: Option<i32>,
#[serde(rename = "genres", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub genres: Option<Option<Vec<String>>>,
#[serde(rename = "author", skip_serializing_if = "Option::is_none")]
pub author: Option<Box<models::AuthorResource>>,
#[serde(rename = "images", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub images: Option<Option<Vec<models::MediaCover>>>,
#[serde(rename = "links", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub links: Option<Option<Vec<models::Links>>>,
#[serde(rename = "statistics", skip_serializing_if = "Option::is_none")]
pub statistics: Option<Box<models::BookStatisticsResource>>,
#[serde(rename = "added", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub added: Option<Option<String>>,
#[serde(rename = "addOptions", skip_serializing_if = "Option::is_none")]
pub add_options: Option<Box<models::AddBookOptions>>,
#[serde(rename = "remoteCover", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub remote_cover: Option<Option<String>>,
#[serde(rename = "editions", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub editions: Option<Option<Vec<models::EditionResource>>>,
}
impl BookResource {
pub fn new() -> BookResource {
BookResource {
id: None,
title: None,
author_title: None,
series_title: None,
disambiguation: None,
overview: None,
author_id: None,
foreign_book_id: None,
foreign_edition_id: None,
title_slug: None,
monitored: None,
any_edition_ok: None,
ratings: None,
release_date: None,
page_count: None,
genres: None,
author: None,
images: None,
links: None,
statistics: None,
added: None,
add_options: None,
remote_cover: None,
editions: None,
}
}
}