using System; using System.Collections.Generic; using UnityEngine.Scripting; using System.Runtime.Serialization; using Newtonsoft.Json; using Newtonsoft.Json.Converters; namespace Unity.Services.Lobbies.Models { /// /// The body of an Update Player Data request. /// [Preserve] [DataContract(Name = "PlayerUpdateRequest")] public class PlayerUpdateRequest { /// /// The body of an Update Player Data request. /// /// (TBD) Connection information for connecting to a relay with this player. /// Custom game-specific properties to add, update, or remove from the player (e.g. `role` or `skill`). To remove an existing property, include it in `data` but set the property object to `null`. To update the value to `null`, set the `value` property of the object to `null`. /// An id that associates this player in this lobby with a persistent connection. When a disconnect notification is recevied, this value is used to identify the associated player in a lobby to mark them as disconnected. [Preserve] public PlayerUpdateRequest(string connectionInfo = null, Dictionary data = null, string allocationId = null) { ConnectionInfo = connectionInfo; Data = data; AllocationId = allocationId; } /// /// (TBD) Connection information for connecting to a relay with this player. /// [Preserve] [DataMember(Name = "connectionInfo", EmitDefaultValue = false)] public string ConnectionInfo{ get; } /// /// Custom game-specific properties to add, update, or remove from the player (e.g. `role` or `skill`). To remove an existing property, include it in `data` but set the property object to `null`. To update the value to `null`, set the `value` property of the object to `null`. /// [Preserve] [DataMember(Name = "data", EmitDefaultValue = false)] public Dictionary Data{ get; } /// /// An id that associates this player in this lobby with a persistent connection. When a disconnect notification is recevied, this value is used to identify the associated player in a lobby to mark them as disconnected. /// [Preserve] [DataMember(Name = "allocationId", EmitDefaultValue = false)] public string AllocationId{ get; } } }