tmdb_client/models/
person_object.rs

1/*
2 * API
3 *
4 * ## Welcome  This is a place to put general notes and extra information, for internal use.  To get started designing/documenting this API, select a version on the left. # Title No Description
5 *
6 * The version of the OpenAPI document: 3
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11#[derive(Debug, Serialize, Deserialize, Clone)]
12pub struct PersonObject {
13    #[serde(rename = "profile_path", skip_serializing_if = "Option::is_none")]
14    pub profile_path: Option<String>,
15    #[serde(rename = "adult", skip_serializing_if = "Option::is_none")]
16    pub adult: Option<bool>,
17    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
18    pub id: Option<i32>,
19    #[serde(rename = "known_for", skip_serializing_if = "Option::is_none")]
20    pub known_for: Option<Vec<serde_json::Value>>,
21    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
22    pub name: Option<String>,
23    #[serde(rename = "popularity", skip_serializing_if = "Option::is_none")]
24    pub popularity: Option<f32>,
25    #[serde(rename = "media_type")]
26    pub media_type: Option<PersonMediaType>,
27}
28
29impl Default for PersonObject {
30    fn default() -> PersonObject {
31        PersonObject {
32            profile_path: None,
33            adult: None,
34            id: None,
35            known_for: None,
36            name: None,
37            popularity: None,
38            media_type: Some(PersonMediaType::Person),
39        }
40    }
41}
42
43#[derive(Debug, Serialize, Deserialize, Clone)]
44pub enum PersonMediaType {
45    #[serde(rename = "person")]
46    Person,
47}