// 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

/// EntityUpdate : entity update record

#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct EntityUpdate {
    #[serde(rename = "entityType", skip_serializing_if = "Option::is_none")]
    pub entity_type: Option<String>,
    #[serde(rename = "methodInt", skip_serializing_if = "Option::is_none")]
    pub method_int: Option<i32>,
    #[serde(rename = "method", skip_serializing_if = "Option::is_none")]
    pub method: Option<String>,
    #[serde(rename = "extraInfo", skip_serializing_if = "Option::is_none")]
    pub extra_info: Option<String>,
    #[serde(rename = "userId", skip_serializing_if = "Option::is_none")]
    pub user_id: Option<i32>,
    #[serde(rename = "recordType", skip_serializing_if = "Option::is_none")]
    pub record_type: Option<String>,
    #[serde(rename = "recordId", skip_serializing_if = "Option::is_none")]
    pub record_id: Option<i64>,
    #[serde(rename = "timeStamp", skip_serializing_if = "Option::is_none")]
    pub time_stamp: Option<i64>,
    /// Only present for episodes records
    #[serde(rename = "seriesId", skip_serializing_if = "Option::is_none")]
    pub series_id: Option<i64>,
    #[serde(rename = "mergeToId", skip_serializing_if = "Option::is_none")]
    pub merge_to_id: Option<i64>,
    #[serde(rename = "mergeToEntityType", skip_serializing_if = "Option::is_none")]
    pub merge_to_entity_type: Option<String>,
}

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

impl EntityUpdate {
    /// entity update record
    pub fn new() -> EntityUpdate {
        EntityUpdate {
            entity_type: None,
            method_int: None,
            method: None,
            extra_info: None,
            user_id: None,
            record_type: None,
            record_id: None,
            time_stamp: None,
            series_id: None,
            merge_to_id: None,
            merge_to_entity_type: None,
        }
    }
}
