// TVDB API V4
//
// Documentation of [TheTVDB](https://thetvdb.com/) API V4. All related information is linked from our [Github repo](https://github.com/thetvdb/v4-api). You might also want to use our [Postman collection] (https://www.getpostman.com/collections/7a9397ce69ff246f74d0) ## Authentication 1. Use the /login endpoint and provide your API key as \"apikey\". If you have a user-supported key, also provide your subscriber PIN as \"pin\". Otherwise completely remove \"pin\" from your call. 2. Executing this call will provide you with a bearer token, which is valid for 1 month. 3. Provide your bearer token for subsequent API calls by clicking Authorize below or including in the header of all direct API calls: `Authorization: Bearer [your-token]`  ## Notes 1. \"score\" is a field across almost all entities.  We generate scores for different types of entities in various ways, so no assumptions should be made about the meaning of this value.  It is simply used to hint at relative popularity for sorting purposes.
//
// The version of the OpenAPI document: 4.7.8
//
// Generated by: https://openapi-generator.tech

/// SearchResult : search result

#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct SearchResult {
    #[serde(rename = "aliases", skip_serializing_if = "Option::is_none")]
    pub aliases: Option<Vec<String>>,
    #[serde(rename = "companies", skip_serializing_if = "Option::is_none")]
    pub companies: Option<Vec<String>>,
    #[serde(rename = "companyType", skip_serializing_if = "Option::is_none")]
    pub company_type: Option<String>,
    #[serde(rename = "country", skip_serializing_if = "Option::is_none")]
    pub country: Option<String>,
    #[serde(rename = "director", skip_serializing_if = "Option::is_none")]
    pub director: Option<String>,
    #[serde(rename = "first_air_time", skip_serializing_if = "Option::is_none")]
    pub first_air_time: Option<String>,
    #[serde(rename = "genres", skip_serializing_if = "Option::is_none")]
    pub genres: Option<Vec<String>>,
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "image_url", skip_serializing_if = "Option::is_none")]
    pub image_url: Option<String>,
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "is_official", skip_serializing_if = "Option::is_none")]
    pub is_official: Option<bool>,
    #[serde(rename = "name_translated", skip_serializing_if = "Option::is_none")]
    pub name_translated: Option<String>,
    #[serde(rename = "network", skip_serializing_if = "Option::is_none")]
    pub network: Option<String>,
    #[serde(rename = "objectID", skip_serializing_if = "Option::is_none")]
    pub object_id: Option<String>,
    #[serde(rename = "officialList", skip_serializing_if = "Option::is_none")]
    pub official_list: Option<String>,
    #[serde(rename = "overview", skip_serializing_if = "Option::is_none")]
    pub overview: Option<String>,
    #[serde(rename = "overviews", skip_serializing_if = "Option::is_none")]
    pub overviews: Option<Vec<crate::models::TranslationSimple>>,
    #[serde(
        rename = "overview_translated",
        skip_serializing_if = "Option::is_none"
    )]
    pub overview_translated: Option<Vec<String>>,
    #[serde(rename = "poster", skip_serializing_if = "Option::is_none")]
    pub poster: Option<String>,
    #[serde(rename = "posters", skip_serializing_if = "Option::is_none")]
    pub posters: Option<Vec<String>>,
    #[serde(rename = "primary_language", skip_serializing_if = "Option::is_none")]
    pub primary_language: Option<String>,
    #[serde(rename = "remote_ids", skip_serializing_if = "Option::is_none")]
    pub remote_ids: Option<Vec<crate::models::RemoteId>>,
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
    #[serde(rename = "slug", skip_serializing_if = "Option::is_none")]
    pub slug: Option<String>,
    #[serde(rename = "studios", skip_serializing_if = "Option::is_none")]
    pub studios: Option<Vec<String>>,
    #[serde(rename = "title", skip_serializing_if = "Option::is_none")]
    pub title: Option<String>,
    #[serde(rename = "thumbnail", skip_serializing_if = "Option::is_none")]
    pub thumbnail: Option<String>,
    #[serde(rename = "translations", skip_serializing_if = "Option::is_none")]
    pub translations: Option<Vec<crate::models::TranslationSimple>>,
    #[serde(
        rename = "translationsWithLang",
        skip_serializing_if = "Option::is_none"
    )]
    pub translations_with_lang: Option<Vec<String>>,
    #[serde(rename = "tvdb_id", skip_serializing_if = "Option::is_none")]
    pub tvdb_id: Option<String>,
    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
    pub r#type: Option<String>,
    #[serde(rename = "year", skip_serializing_if = "Option::is_none")]
    pub year: Option<String>,
}

impl Default for SearchResult {
    fn default() -> Self {
        Self::new()
    }
}

impl SearchResult {
    /// search result
    pub fn new() -> SearchResult {
        SearchResult {
            aliases: None,
            companies: None,
            company_type: None,
            country: None,
            director: None,
            first_air_time: None,
            genres: None,
            id: None,
            image_url: None,
            name: None,
            is_official: None,
            name_translated: None,
            network: None,
            object_id: None,
            official_list: None,
            overview: None,
            overviews: None,
            overview_translated: None,
            poster: None,
            posters: None,
            primary_language: None,
            remote_ids: None,
            status: None,
            slug: None,
            studios: None,
            title: None,
            thumbnail: None,
            translations: None,
            translations_with_lang: None,
            tvdb_id: None,
            r#type: None,
            year: None,
        }
    }
}
