use crate::models;
use serde::{Deserialize, Serialize};
#[serde_with::serde_as]
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WebsocketFriendOnline {
#[serde(rename = "canRequestInvite")]
pub can_request_invite: bool,
/// Represents a unique location, consisting of a world identifier and an instance identifier, or \"offline\" if the user is not on your friends list.
#[serde(rename = "location")]
pub location: String,
/// This is normally `android`, `ios`, `standalonewindows`, `web`, or the empty value ``, but also supposedly can be any random Unity version such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`.
#[serde(rename = "platform")]
pub platform: 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 = "userId")]
pub user_id: String,
}
impl WebsocketFriendOnline {
pub fn new(
can_request_invite: bool,
location: String,
platform: String,
user_id: String,
) -> WebsocketFriendOnline {
WebsocketFriendOnline {
can_request_invite,
location,
platform,
user_id,
}
}
}