Files
vrchatapi-rust/src/models/license.rs
C0D3 M4513R 9534a4ed8a Add formatting (#20)
* 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>
2024-09-28 19:01:11 +02:00

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