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};

/// Prop :
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Prop {
    #[serde(rename = "_created_at")]
    pub _created_at: String,
    #[serde(rename = "_updated_at")]
    pub _updated_at: 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 = "authorId")]
    pub author_id: String,
    #[serde(rename = "authorName")]
    pub author_name: String,
    #[serde(rename = "description")]
    pub description: String,
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "imageUrl")]
    pub image_url: String,
    #[serde(rename = "maxCountPerUser")]
    pub max_count_per_user: i32,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "releaseStatus")]
    pub release_status: models::ReleaseStatus,
    /// How a prop is summoned and interacted with. 0: the prop fixed to some surface in the world 1: the prop is a pickup and may be held by users 2: ???
    #[serde(rename = "spawnType")]
    pub spawn_type: i32,
    #[serde(rename = "tags")]
    pub tags: Vec<String>,
    #[serde(rename = "thumbnailImageUrl")]
    pub thumbnail_image_url: String,
    #[serde(rename = "unityPackageUrl", deserialize_with = "Option::deserialize")]
    pub unity_package_url: Option<String>,
    #[serde(rename = "unityPackages")]
    pub unity_packages: Vec<models::PropUnityPackage>,
    /// Bitmask for restrictions on what world surfaces a prop may be summoned. 0: no restrictions 1: floors 2: walls 4: ceilings
    #[serde(rename = "worldPlacementMask")]
    pub world_placement_mask: i32,
}

impl Prop {
    pub fn new(
        _created_at: String,
        _updated_at: String,
        author_id: String,
        author_name: String,
        description: String,
        id: String,
        image_url: String,
        max_count_per_user: i32,
        name: String,
        release_status: models::ReleaseStatus,
        spawn_type: i32,
        tags: Vec<String>,
        thumbnail_image_url: String,
        unity_package_url: Option<String>,
        unity_packages: Vec<models::PropUnityPackage>,
        world_placement_mask: i32,
    ) -> Prop {
        Prop {
            _created_at,
            _updated_at,
            author_id,
            author_name,
            description,
            id,
            image_url,
            max_count_per_user,
            name,
            release_status,
            spawn_type,
            tags,
            thumbnail_image_url,
            unity_package_url,
            unity_packages,
            world_placement_mask,
        }
    }
}