mirror of
https://github.com/mii443/vrchatapi-rust.git
synced 2025-08-22 15:45:35 +00:00
55 lines
1.8 KiB
Rust
55 lines
1.8 KiB
Rust
/*
|
|
* VRChat API Documentation
|
|
*
|
|
*
|
|
* Contact: me@ruby.js.org
|
|
* Generated by: https://openapi-generator.tech
|
|
*/
|
|
|
|
|
|
|
|
|
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
|
pub struct UnityPackage {
|
|
#[serde(rename = "assetUrl", skip_serializing_if = "Option::is_none")]
|
|
pub asset_url: Option<String>,
|
|
#[serde(rename = "assetUrlObject", skip_serializing_if = "Option::is_none")]
|
|
pub asset_url_object: Option<serde_json::Value>,
|
|
#[serde(rename = "assetVersion")]
|
|
pub asset_version: i32,
|
|
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
|
|
pub created_at: Option<String>,
|
|
#[serde(rename = "id")]
|
|
pub id: String,
|
|
/// This can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`.
|
|
#[serde(rename = "platform")]
|
|
pub platform: String,
|
|
#[serde(rename = "pluginUrl", skip_serializing_if = "Option::is_none")]
|
|
pub plugin_url: Option<String>,
|
|
#[serde(rename = "pluginUrlObject", skip_serializing_if = "Option::is_none")]
|
|
pub plugin_url_object: Option<serde_json::Value>,
|
|
#[serde(rename = "unitySortNumber", skip_serializing_if = "Option::is_none")]
|
|
pub unity_sort_number: Option<i32>,
|
|
#[serde(rename = "unityVersion")]
|
|
pub unity_version: String,
|
|
}
|
|
|
|
impl UnityPackage {
|
|
pub fn new(asset_version: i32, id: String, platform: String, unity_version: String) -> UnityPackage {
|
|
UnityPackage {
|
|
asset_url: None,
|
|
asset_url_object: None,
|
|
asset_version,
|
|
created_at: None,
|
|
id,
|
|
platform,
|
|
plugin_url: None,
|
|
plugin_url_object: None,
|
|
unity_sort_number: None,
|
|
unity_version,
|
|
}
|
|
}
|
|
}
|
|
|
|
|