mirror of
https://github.com/mii443/vrchatapi-rust.git
synced 2025-08-22 15:45:35 +00:00
* add formatting Signed-off-by: C0D3 M4513R <28912031+C0D3-M4513R@users.noreply.github.com> * Apply Changes --------- Signed-off-by: C0D3 M4513R <28912031+C0D3-M4513R@users.noreply.github.com>
40 lines
954 B
Rust
40 lines
954 B
Rust
/*
|
|
* VRChat API Documentation
|
|
*
|
|
*
|
|
* Contact: vrchatapi.lpv0t@aries.fyi
|
|
* Generated by: https://openapi-generator.tech
|
|
*/
|
|
|
|
use crate::models;
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
pub struct License {
|
|
/// Either a AvatarID, LicenseGroupID, PermissionID or ProductID. This depends on the `forType` field.
|
|
#[serde(rename = "forId")]
|
|
pub for_id: String,
|
|
#[serde(rename = "forType")]
|
|
pub for_type: models::LicenseType,
|
|
#[serde(rename = "forName")]
|
|
pub for_name: String,
|
|
#[serde(rename = "forAction")]
|
|
pub for_action: models::LicenseAction,
|
|
}
|
|
|
|
impl License {
|
|
pub fn new(
|
|
for_id: String,
|
|
for_type: models::LicenseType,
|
|
for_name: String,
|
|
for_action: models::LicenseAction,
|
|
) -> License {
|
|
License {
|
|
for_id,
|
|
for_type,
|
|
for_name,
|
|
for_action,
|
|
}
|
|
}
|
|
}
|