Apply Changes

This commit is contained in:
C0D3 M4513R
2024-08-11 18:22:20 +02:00
parent dfcd8ff73c
commit 15e93d80a2
116 changed files with 1881 additions and 814 deletions

View File

@ -9,28 +9,28 @@
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateInstanceRequest {
/// WorldID be \"offline\" on User profiles if you are not friends with that user.
#[serde(rename = "worldId")]
pub world_id: String,
pub world_id: std::sync::Arc<str>,
#[serde(rename = "type")]
pub r#type: models::InstanceType,
#[serde(rename = "region")]
pub region: models::InstanceRegion,
/// A groupId if the instance type is \"group\", null if instance type is public, or a userId otherwise
#[serde(rename = "ownerId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub owner_id: Option<Option<String>>,
pub owner_id: Option<Option<std::sync::Arc<str>>>,
/// Group roleIds that are allowed to join if the type is \"group\" and groupAccessType is \"member\"
#[serde(rename = "roleIds", skip_serializing_if = "Option::is_none")]
pub role_ids: Option<Vec<String>>,
pub role_ids: Option<Vec<std::sync::Arc<str>>>,
#[serde(rename = "groupAccessType", skip_serializing_if = "Option::is_none")]
pub group_access_type: Option<models::GroupAccessType>,
#[serde(rename = "queueEnabled", skip_serializing_if = "Option::is_none")]
pub queue_enabled: Option<bool>,
/// The time after which users won't be allowed to join the instance. This doesn't work for public instances.
#[serde(rename = "closedAt", skip_serializing_if = "Option::is_none")]
pub closed_at: Option<String>,
pub closed_at: Option<std::sync::Arc<str>>,
/// Only applies to invite type instances to make them invite+
#[serde(rename = "canRequestInvite", skip_serializing_if = "Option::is_none")]
pub can_request_invite: Option<bool>,
@ -42,7 +42,7 @@ pub struct CreateInstanceRequest {
}
impl CreateInstanceRequest {
pub fn new(world_id: String, r#type: models::InstanceType, region: models::InstanceRegion) -> CreateInstanceRequest {
pub fn new(world_id: std::sync::Arc<str>, r#type: models::InstanceType, region: models::InstanceRegion) -> CreateInstanceRequest {
CreateInstanceRequest {
world_id,
r#type,