/* * VRChat API Documentation * * * Contact: vrchatapi.lpv0t@aries.fyi * Generated by: https://openapi-generator.tech */ /// Instance : * `hidden` field is only present if InstanceType is `hidden` aka \"Friends+\", and is instance creator. * `friends` field is only present if InstanceType is `friends` aka \"Friends\", and is instance creator. * `private` field is only present if InstanceType is `private` aka \"Invite\" or \"Invite+\", and is instance creator. #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct Instance { #[serde(rename = "active")] pub active: bool, #[serde(rename = "canRequestInvite")] pub can_request_invite: bool, #[serde(rename = "capacity")] pub capacity: i32, /// Always returns \"unknown\". #[serde(rename = "clientNumber")] pub client_number: String, #[serde(rename = "full")] pub full: bool, /// InstanceID can be \"offline\" on User profiles if you are not friends with that user and \"private\" if you are friends and user is in private instance. #[serde(rename = "id")] pub id: String, #[serde(rename = "instanceId")] pub instance_id: String, /// InstanceID can be \"offline\" on User profiles if you are not friends with that user and \"private\" if you are friends and user is in private instance. #[serde(rename = "location")] pub location: String, #[serde(rename = "n_users")] pub n_users: i32, #[serde(rename = "name")] pub name: String, /// 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>, #[serde(rename = "permanent")] pub permanent: bool, #[serde(rename = "photonRegion")] pub photon_region: crate::models::Region, #[serde(rename = "platforms")] pub platforms: Box, #[serde(rename = "region")] pub region: crate::models::Region, #[serde(rename = "secureName")] pub secure_name: String, #[serde(rename = "shortName", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub short_name: Option>, /// The tags array on Instances usually contain the language tags of the people in the instance. #[serde(rename = "tags")] pub tags: Vec, #[serde(rename = "type")] pub r#type: crate::models::InstanceType, /// WorldID be \"offline\" on User profiles if you are not friends with that user. #[serde(rename = "worldId")] pub world_id: String, /// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. #[serde(rename = "hidden", skip_serializing_if = "Option::is_none")] pub hidden: Option, /// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. #[serde(rename = "friends", skip_serializing_if = "Option::is_none")] pub friends: Option, /// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. #[serde(rename = "private", skip_serializing_if = "Option::is_none")] pub private: Option, #[serde(rename = "queueEnabled")] pub queue_enabled: bool, #[serde(rename = "queueSize")] pub queue_size: i32, #[serde(rename = "recommendedCapacity")] pub recommended_capacity: i32, #[serde(rename = "roleRestricted", skip_serializing_if = "Option::is_none")] pub role_restricted: Option, #[serde(rename = "strict")] pub strict: bool, #[serde(rename = "userCount")] pub user_count: i32, #[serde(rename = "world")] pub world: Box, /// The users field is present on instances created by the requesting user. #[serde(rename = "users", skip_serializing_if = "Option::is_none")] pub users: Option>, #[serde(rename = "groupAccessType", skip_serializing_if = "Option::is_none")] pub group_access_type: Option, #[serde(rename = "hasCapacityForYou", skip_serializing_if = "Option::is_none")] pub has_capacity_for_you: Option, #[serde(rename = "nonce", skip_serializing_if = "Option::is_none")] pub nonce: Option, #[serde(rename = "closedAt", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub closed_at: Option>, #[serde(rename = "hardClose", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub hard_close: Option>, } impl Instance { /// * `hidden` field is only present if InstanceType is `hidden` aka \"Friends+\", and is instance creator. * `friends` field is only present if InstanceType is `friends` aka \"Friends\", and is instance creator. * `private` field is only present if InstanceType is `private` aka \"Invite\" or \"Invite+\", and is instance creator. pub fn new(active: bool, can_request_invite: bool, capacity: i32, client_number: String, full: bool, id: String, instance_id: String, location: String, n_users: i32, name: String, permanent: bool, photon_region: crate::models::Region, platforms: crate::models::InstancePlatforms, region: crate::models::Region, secure_name: String, tags: Vec, r#type: crate::models::InstanceType, world_id: String, queue_enabled: bool, queue_size: i32, recommended_capacity: i32, strict: bool, user_count: i32, world: crate::models::World) -> Instance { Instance { active, can_request_invite, capacity, client_number, full, id, instance_id, location, n_users, name, owner_id: None, permanent, photon_region, platforms: Box::new(platforms), region, secure_name, short_name: None, tags, r#type, world_id, hidden: None, friends: None, private: None, queue_enabled, queue_size, recommended_capacity, role_restricted: None, strict, user_count, world: Box::new(world), users: None, group_access_type: None, has_capacity_for_you: None, nonce: None, closed_at: None, hard_close: None, } } }