/* * VRChat API Documentation * * * Contact: vrchatapi.lpv0t@aries.fyi * Generated by: https://openapi-generator.tech */ #[derive(Clone, Debug, PartialEq, Default, 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, #[serde(rename = "type")] pub r#type: crate::models::InstanceType, #[serde(rename = "region")] pub region: crate::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>, /// 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>, #[serde(rename = "groupAccessType", skip_serializing_if = "Option::is_none")] pub group_access_type: Option, #[serde(rename = "queueEnabled", skip_serializing_if = "Option::is_none")] pub queue_enabled: Option, /// 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, /// Only applies to invite type instances to make them invite+ #[serde(rename = "canRequestInvite", skip_serializing_if = "Option::is_none")] pub can_request_invite: Option, /// Currently unused, but will eventually be a flag to set if the closing of the instance should kick people. #[serde(rename = "hardClose", skip_serializing_if = "Option::is_none")] pub hard_close: Option, #[serde(rename = "inviteOnly", skip_serializing_if = "Option::is_none")] pub invite_only: Option, } impl CreateInstanceRequest { pub fn new(world_id: String, r#type: crate::models::InstanceType, region: crate::models::InstanceRegion) -> CreateInstanceRequest { CreateInstanceRequest { world_id, r#type, region, owner_id: None, role_ids: None, group_access_type: None, queue_enabled: None, closed_at: None, can_request_invite: None, hard_close: None, invite_only: None, } } }