vrchatapi 1.20.7

VRChat API Client for Rust
Documentation
/*
 * VRChat API Documentation
 *
 *
 * Contact: vrchatapi.lpv0t@aries.fyi
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// Print : Info about a print
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Print {
    /// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.
    #[serde(rename = "authorId")]
    pub author_id: String,
    #[serde(rename = "authorName")]
    pub author_name: String,
    #[serde(rename = "createdAt")]
    pub created_at: String,
    #[serde(rename = "files")]
    pub files: models::PrintFiles,
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "note")]
    pub note: String,
    /// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.
    #[serde(rename = "ownerId", skip_serializing_if = "Option::is_none")]
    pub owner_id: Option<String>,
    #[serde(rename = "timestamp")]
    pub timestamp: String,
    /// WorldID be \"offline\" on User profiles if you are not friends with that user.
    #[serde(rename = "worldId")]
    pub world_id: String,
    #[serde(rename = "worldName")]
    pub world_name: String,
}

impl Print {
    /// Info about a print
    pub fn new(
        author_id: String,
        author_name: String,
        created_at: String,
        files: models::PrintFiles,
        id: String,
        note: String,
        timestamp: String,
        world_id: String,
        world_name: String,
    ) -> Print {
        Print {
            author_id,
            author_name,
            created_at,
            files,
            id,
            note,
            owner_id: None,
            timestamp,
            world_id,
            world_name,
        }
    }
}