Add nullable support

This commit is contained in:
AeonLucid
2022-01-07 07:09:50 +01:00
parent 2f01cf7411
commit bf14074046
44 changed files with 349 additions and 170 deletions
@@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Authorization; using System.Net.Mime;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Prospect.Server.Api.Config; using Prospect.Server.Api.Config;
@@ -45,8 +46,8 @@ public class ClientController : Controller
[AllowAnonymous] [AllowAnonymous]
[HttpPost("LoginWithSteam")] [HttpPost("LoginWithSteam")]
[Produces("application/json")] [Produces(MediaTypeNames.Application.Json)]
public async Task<IActionResult> LoginWithSteam(ClientLoginWithSteamRequest request) public async Task<IActionResult> LoginWithSteam(FLoginWithSteamRequest request)
{ {
if (!string.IsNullOrEmpty(request.SteamTicket)) if (!string.IsNullOrEmpty(request.SteamTicket))
{ {
@@ -125,7 +126,7 @@ public class ClientController : Controller
} }
[HttpPost("AddGenericID")] [HttpPost("AddGenericID")]
[Produces("application/json")] [Produces(MediaTypeNames.Application.Json)]
[Authorize(AuthenticationSchemes = UserAuthenticationOptions.DefaultScheme)] [Authorize(AuthenticationSchemes = UserAuthenticationOptions.DefaultScheme)]
public IActionResult AddGenericId(FAddGenericIDRequest request) public IActionResult AddGenericId(FAddGenericIDRequest request)
{ {
@@ -138,7 +139,7 @@ public class ClientController : Controller
} }
[HttpPost("UpdateUserTitleDisplayName")] [HttpPost("UpdateUserTitleDisplayName")]
[Produces("application/json")] [Produces(MediaTypeNames.Application.Json)]
[Authorize(AuthenticationSchemes = UserAuthenticationOptions.DefaultScheme)] [Authorize(AuthenticationSchemes = UserAuthenticationOptions.DefaultScheme)]
public IActionResult UpdateUserTitleDisplayName(FUpdateUserTitleDisplayNameRequest request) public IActionResult UpdateUserTitleDisplayName(FUpdateUserTitleDisplayNameRequest request)
{ {
@@ -154,7 +155,7 @@ public class ClientController : Controller
} }
[HttpPost("UpdateUserData")] [HttpPost("UpdateUserData")]
[Produces("application/json")] [Produces(MediaTypeNames.Application.Json)]
[Authorize(AuthenticationSchemes = UserAuthenticationOptions.DefaultScheme)] [Authorize(AuthenticationSchemes = UserAuthenticationOptions.DefaultScheme)]
public async Task<IActionResult> UpdateUserData(FUpdateUserDataRequest request) public async Task<IActionResult> UpdateUserData(FUpdateUserDataRequest request)
{ {
@@ -173,7 +174,7 @@ public class ClientController : Controller
} }
[HttpPost("GetUserData")] [HttpPost("GetUserData")]
[Produces("application/json")] [Produces(MediaTypeNames.Application.Json)]
[Authorize(AuthenticationSchemes = UserAuthenticationOptions.DefaultScheme)] [Authorize(AuthenticationSchemes = UserAuthenticationOptions.DefaultScheme)]
public async Task<IActionResult> GetUserData(FGetUserDataRequest request) public async Task<IActionResult> GetUserData(FGetUserDataRequest request)
{ {
@@ -193,7 +194,7 @@ public class ClientController : Controller
} }
[HttpPost("GetUserReadOnlyData")] [HttpPost("GetUserReadOnlyData")]
[Produces("application/json")] [Produces(MediaTypeNames.Application.Json)]
[Authorize(AuthenticationSchemes = UserAuthenticationOptions.DefaultScheme)] [Authorize(AuthenticationSchemes = UserAuthenticationOptions.DefaultScheme)]
public IActionResult GetUserReadOnlyData(FGetUserDataRequest request) public IActionResult GetUserReadOnlyData(FGetUserDataRequest request)
{ {
@@ -210,7 +211,7 @@ public class ClientController : Controller
} }
[HttpPost("GetUserInventory")] [HttpPost("GetUserInventory")]
[Produces("application/json")] [Produces(MediaTypeNames.Application.Json)]
[Authorize(AuthenticationSchemes = UserAuthenticationOptions.DefaultScheme)] [Authorize(AuthenticationSchemes = UserAuthenticationOptions.DefaultScheme)]
public IActionResult GetUserReadOnlyData(FGetUserInventoryRequest request) public IActionResult GetUserReadOnlyData(FGetUserInventoryRequest request)
{ {
@@ -252,7 +253,7 @@ public class ClientController : Controller
} }
[HttpPost("GetTitleData")] [HttpPost("GetTitleData")]
[Produces("application/json")] [Produces(MediaTypeNames.Application.Json)]
[Authorize(AuthenticationSchemes = UserAuthenticationOptions.DefaultScheme)] [Authorize(AuthenticationSchemes = UserAuthenticationOptions.DefaultScheme)]
public IActionResult GetTitleData(FGetTitleDataRequest request) public IActionResult GetTitleData(FGetTitleDataRequest request)
{ {
@@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Authorization; using System.Net.Mime;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Prospect.Server.Api.Models.Client; using Prospect.Server.Api.Models.Client;
using Prospect.Server.Api.Models.CloudScript; using Prospect.Server.Api.Models.CloudScript;
@@ -21,7 +22,7 @@ public class CloudScriptController : Controller
} }
[HttpPost("ExecuteFunction")] [HttpPost("ExecuteFunction")]
[Produces("application/json")] [Produces(MediaTypeNames.Application.Json)]
public IActionResult ExecuteFunction(FExecuteFunctionRequest request) public IActionResult ExecuteFunction(FExecuteFunctionRequest request)
{ {
_logger.LogInformation("Executing function {Function}", request.FunctionName); _logger.LogInformation("Executing function {Function}", request.FunctionName);
@@ -0,0 +1,47 @@
using System.Net.Mime;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Prospect.Server.Api.Models.Client;
using Prospect.Server.Api.Models.Multiplayer;
using Prospect.Server.Api.Models.Multiplayer.Data;
using Prospect.Server.Api.Services.Auth.Entity;
using Prospect.Server.Api.Services.Auth.User;
namespace Prospect.Server.Api.Controllers;
[Route("MultiplayerServer")]
[ApiController]
[Authorize(AuthenticationSchemes = EntityAuthenticationOptions.DefaultScheme)]
public class MultiplayerController : Controller
{
private readonly ILogger<MultiplayerController> _logger;
public MultiplayerController(ILogger<MultiplayerController> logger)
{
_logger = logger;
}
[HttpPost("ListQosServersForTitle")]
[Produces(MediaTypeNames.Application.Json)]
[Authorize(AuthenticationSchemes = UserAuthenticationOptions.DefaultScheme)]
public IActionResult ListQosServersForTitle(FListQosServersForTitleRequest request)
{
return Ok(new ClientResponse<object>
{
Code = 200,
Status = "OK",
Data = new FListQosServersForTitleResponse
{
PageSize = 1,
QosServers = new List<FQosServer>
{
new FQosServer
{
Region = "NorthEurope",
ServerUrl = "127.0.0.1"
}
}
}
});
}
}
@@ -1,58 +0,0 @@
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Prospect.Server.Api.Models.Client;
public class ClientLoginWithSteamRequest
{
[JsonPropertyName("CreateAccount")]
public bool CreateAccount { get; set; }
[JsonPropertyName("CustomTags")]
public JsonDocument CustomTags { get; set; }
[JsonPropertyName("EncryptedRequest")]
public string EncryptedRequest { get; set; }
[JsonPropertyName("InfoRequestParameters")]
public InfoParameters InfoRequestParameters { get; set; }
[JsonPropertyName("PlayerSecret")]
public string PlayerSecret { get; set; }
[JsonPropertyName("SteamTicket")]
public string SteamTicket { get; set; }
}
public class InfoParameters
{
[JsonPropertyName("GetCharacterInventories")]
public bool GetCharacterInventories { get; set; }
[JsonPropertyName("GetCharacterList")]
public bool GetCharacterList { get; set; }
[JsonPropertyName("GetPlayerProfile")]
public bool GetPlayerProfile { get; set; }
[JsonPropertyName("GetPlayerStatistics")]
public bool GetPlayerStatistics { get; set; }
[JsonPropertyName("GetTitleData")]
public bool GetTitleData { get; set; }
[JsonPropertyName("GetUserAccountInfo")]
public bool GetUserAccountInfo { get; set; }
[JsonPropertyName("GetUserData")]
public bool GetUserData { get; set; }
[JsonPropertyName("GetUserInventory")]
public bool GetUserInventory { get; set; }
[JsonPropertyName("GetUserReadOnlyData")]
public bool GetUserReadOnlyData { get; set; }
[JsonPropertyName("GetUserVirtualCurrency")]
public bool GetUserVirtualCurrency { get; set; }
}
@@ -8,15 +8,15 @@ public class FEntityKey
/// Unique ID of the entity. /// Unique ID of the entity.
/// </summary> /// </summary>
[JsonPropertyName("Id")] [JsonPropertyName("Id")]
public string Id { get; set; } public string Id { get; set; } = null!;
/// <summary> /// <summary>
/// [optional] Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types /// [optional] Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types
/// </summary> /// </summary>
[JsonPropertyName("Type")] [JsonPropertyName("Type")]
public string Type { get; set; } public string? Type { get; set; }
// Not in PlayFab SDK // Not in PlayFab SDK
[JsonPropertyName("TypeString")] [JsonPropertyName("TypeString")]
public string TypeString { get; set; } public string TypeString { get; set; } = null!;
} }
@@ -9,14 +9,14 @@ public class FEntityTokenResponse
/// </summary> /// </summary>
[JsonPropertyName("Entity")] [JsonPropertyName("Entity")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public FEntityKey Entity { get; set; } public FEntityKey? Entity { get; set; }
/// <summary> /// <summary>
/// [optional] The token used to set X-EntityToken for all entity based API calls. /// [optional] The token used to set X-EntityToken for all entity based API calls.
/// </summary> /// </summary>
[JsonPropertyName("EntityToken")] [JsonPropertyName("EntityToken")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string EntityToken { get; set; } public string? EntityToken { get; set; }
/// <summary> /// <summary>
/// [optional] The time the token will expire, if it is an expiring token, in UTC. /// [optional] The time the token will expire, if it is an expiring token, in UTC.
@@ -10,19 +10,19 @@ public class FFunctionExecutionError
/// </summary> /// </summary>
[JsonPropertyName("Error")] [JsonPropertyName("Error")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string Error { get; set; } public string? Error { get; set; }
/// <summary> /// <summary>
/// [optional] Details about the error /// [optional] Details about the error
/// </summary> /// </summary>
[JsonPropertyName("Message")] [JsonPropertyName("Message")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string Message { get; set; } public string? Message { get; set; }
/// <summary> /// <summary>
/// [optional] Point during the execution of the function at which the error occurred, if any /// [optional] Point during the execution of the function at which the error occurred, if any
/// </summary> /// </summary>
[JsonPropertyName("StackTrace")] [JsonPropertyName("StackTrace")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string StackTrace { get; set; } public string? StackTrace { get; set; }
} }
@@ -8,11 +8,11 @@ public class FGenericServiceId
/// Name of the service for which the player has a unique identifier. /// Name of the service for which the player has a unique identifier.
/// </summary> /// </summary>
[JsonPropertyName("ServiceName")] [JsonPropertyName("ServiceName")]
public string ServiceName { get; set; } public string ServiceName { get; set; } = null!;
/// <summary> /// <summary>
/// Unique identifier of the player in that service. /// Unique identifier of the player in that service.
/// </summary> /// </summary>
[JsonPropertyName("UserId")] [JsonPropertyName("UserId")]
public string UserId { get; set; } public string UserId { get; set; } = null!;
} }
@@ -0,0 +1,66 @@
using System.Text.Json.Serialization;
namespace Prospect.Server.Api.Models.Client.Data;
public class FGetPlayerCombinedInfoRequestParams
{
/// <summary>
/// Whether to get character inventories. Defaults to false.
/// </summary>
[JsonPropertyName("GetCharacterInventories")]
public bool GetCharacterInventories { get; set; }
/// <summary>
/// Whether to get the list of characters. Defaults to false.
/// </summary>
[JsonPropertyName("GetCharacterList")]
public bool GetCharacterList { get; set; }
/// <summary>
/// Whether to get player profile. Defaults to false. Has no effect for a new player.
/// </summary>
[JsonPropertyName("GetPlayerProfile")]
public bool GetPlayerProfile { get; set; }
/// <summary>
/// Whether to get player statistics. Defaults to false.
/// </summary>
[JsonPropertyName("GetPlayerStatistics")]
public bool GetPlayerStatistics { get; set; }
/// <summary>
/// Whether to get title data. Defaults to false.
/// </summary>
[JsonPropertyName("GetTitleData")]
public bool GetTitleData { get; set; }
/// <summary>
/// Whether to get the player's account Info. Defaults to false
/// </summary>
[JsonPropertyName("GetUserAccountInfo")]
public bool GetUserAccountInfo { get; set; }
/// <summary>
/// Whether to get the player's custom data. Defaults to false
/// </summary>
[JsonPropertyName("GetUserData")]
public bool GetUserData { get; set; }
/// <summary>
/// Whether to get the player's inventory. Defaults to false
/// </summary>
[JsonPropertyName("GetUserInventory")]
public bool GetUserInventory { get; set; }
/// <summary>
/// Whether to get the player's read only data. Defaults to false
/// </summary>
[JsonPropertyName("GetUserReadOnlyData")]
public bool GetUserReadOnlyData { get; set; }
/// <summary>
/// Whether to get the player's virtual currency balances. Defaults to false
/// </summary>
[JsonPropertyName("GetUserVirtualCurrency")]
public bool GetUserVirtualCurrency { get; set; }
}
@@ -11,7 +11,7 @@ public class FGetPlayerCombinedInfoResultPayload
/// </summary> /// </summary>
[JsonPropertyName("CharacterInventories")] [JsonPropertyName("CharacterInventories")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public List<object> CharacterInventories { get; set; } public List<object>? CharacterInventories { get; set; }
// TArray<FCharacterResult> CharacterList; // TArray<FCharacterResult> CharacterList;
@@ -21,7 +21,7 @@ public class FGetPlayerCombinedInfoResultPayload
/// </summary> /// </summary>
[JsonPropertyName("PlayerProfile")] [JsonPropertyName("PlayerProfile")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public FPlayerProfileModel PlayerProfile { get; set; } public FPlayerProfileModel? PlayerProfile { get; set; }
// TArray<FStatisticValue> PlayerStatistics; // TArray<FStatisticValue> PlayerStatistics;
@@ -41,7 +41,7 @@ public class FGetPlayerCombinedInfoResultPayload
/// </summary> /// </summary>
[JsonPropertyName("UserInventory")] [JsonPropertyName("UserInventory")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public List<object> UserInventory { get; set; } public List<object>? UserInventory { get; set; }
// TMap<FString, FUserDataRecord> UserReadOnlyData; // TMap<FString, FUserDataRecord> UserReadOnlyData;
@@ -9,14 +9,14 @@ public class FItemInstance
/// </summary> /// </summary>
[JsonPropertyName("Annotation")] [JsonPropertyName("Annotation")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string Annotation { get; set; } public string? Annotation { get; set; }
/// <summary> /// <summary>
/// [optional] Array of unique items that were awarded when this catalog item was purchased. /// [optional] Array of unique items that were awarded when this catalog item was purchased.
/// </summary> /// </summary>
[JsonPropertyName("BundleContents")] [JsonPropertyName("BundleContents")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public List<string> BundleContents { get; set; } public List<string>? BundleContents { get; set; }
/// <summary> /// <summary>
/// [optional] Unique identifier for the parent inventory item, as defined in the catalog, for object which were added from a bundle or /// [optional] Unique identifier for the parent inventory item, as defined in the catalog, for object which were added from a bundle or
@@ -24,14 +24,14 @@ public class FItemInstance
/// </summary> /// </summary>
[JsonPropertyName("BundleParent")] [JsonPropertyName("BundleParent")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string BundleParent { get; set; } public string? BundleParent { get; set; }
/// <summary> /// <summary>
/// [optional] Catalog version for the inventory item, when this instance was created. /// [optional] Catalog version for the inventory item, when this instance was created.
/// </summary> /// </summary>
[JsonPropertyName("CatalogVersion")] [JsonPropertyName("CatalogVersion")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string CatalogVersion { get; set; } public string? CatalogVersion { get; set; }
/// <summary> /// <summary>
/// [optional] A set of custom key-value pairs on the instance of the inventory item, which is not to be confused with the catalog /// [optional] A set of custom key-value pairs on the instance of the inventory item, which is not to be confused with the catalog
@@ -39,14 +39,14 @@ public class FItemInstance
/// </summary> /// </summary>
[JsonPropertyName("CustomData")] [JsonPropertyName("CustomData")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Dictionary<string, string> CustomData { get; set; } public Dictionary<string, string>? CustomData { get; set; }
/// <summary> /// <summary>
/// [optional] CatalogItem.DisplayName at the time this item was purchased. /// [optional] CatalogItem.DisplayName at the time this item was purchased.
/// </summary> /// </summary>
[JsonPropertyName("DisplayName")] [JsonPropertyName("DisplayName")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string DisplayName { get; set; } public string? DisplayName { get; set; }
/// <summary> /// <summary>
/// [optional] Timestamp for when this instance will expire. /// [optional] Timestamp for when this instance will expire.
@@ -60,21 +60,21 @@ public class FItemInstance
/// </summary> /// </summary>
[JsonPropertyName("ItemClass")] [JsonPropertyName("ItemClass")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string ItemClass { get; set; } public string? ItemClass { get; set; }
/// <summary> /// <summary>
/// [optional] Unique identifier for the inventory item, as defined in the catalog. /// [optional] Unique identifier for the inventory item, as defined in the catalog.
/// </summary> /// </summary>
[JsonPropertyName("ItemId")] [JsonPropertyName("ItemId")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string ItemId { get; set; } public string? ItemId { get; set; }
/// <summary> /// <summary>
/// [optional] Unique item identifier for this specific instance of the item. /// [optional] Unique item identifier for this specific instance of the item.
/// </summary> /// </summary>
[JsonPropertyName("ItemInstanceId")] [JsonPropertyName("ItemInstanceId")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string ItemInstanceId { get; set; } public string? ItemInstanceId { get; set; }
/// <summary> /// <summary>
/// [optional] Timestamp for when this instance was purchased. /// [optional] Timestamp for when this instance was purchased.
@@ -95,7 +95,7 @@ public class FItemInstance
/// </summary> /// </summary>
[JsonPropertyName("UnitCurrency")] [JsonPropertyName("UnitCurrency")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string UnitCurrency { get; set; } public string? UnitCurrency { get; set; }
/// <summary> /// <summary>
/// Cost of the catalog item in the given currency. Not available when granting items. /// Cost of the catalog item in the given currency. Not available when granting items.
@@ -9,19 +9,19 @@ public class FLogStatement
/// </summary> /// </summary>
[JsonPropertyName("Data")] [JsonPropertyName("Data")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public object Data { get; set; } public object? Data { get; set; }
/// <summary> /// <summary>
/// [optional] 'Debug', 'Info', or 'Error' /// [optional] 'Debug', 'Info', or 'Error'
/// </summary> /// </summary>
[JsonPropertyName("Level")] [JsonPropertyName("Level")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string Level { get; set; } public string? Level { get; set; }
/// <summary> /// <summary>
/// [optional] undefined /// [optional] undefined
/// </summary> /// </summary>
[JsonPropertyName("Message")] [JsonPropertyName("Message")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string Message { get; set; } public string? Message { get; set; }
} }
@@ -9,26 +9,26 @@ public class FPlayerProfileModel
/// </summary> /// </summary>
[JsonPropertyName("DisplayName")] [JsonPropertyName("DisplayName")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string DisplayName { get; set; } public string? DisplayName { get; set; }
/// <summary> /// <summary>
/// [optional] PlayFab player account unique identifier /// [optional] PlayFab player account unique identifier
/// </summary> /// </summary>
[JsonPropertyName("PlayerId")] [JsonPropertyName("PlayerId")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string PlayerId { get; set; } public string? PlayerId { get; set; }
/// <summary> /// <summary>
/// [optional] Publisher this player belongs to /// [optional] Publisher this player belongs to
/// </summary> /// </summary>
[JsonPropertyName("PublisherId")] [JsonPropertyName("PublisherId")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string PublisherId { get; set; } public string? PublisherId { get; set; }
/// <summary> /// <summary>
/// [optional] Title ID this player profile applies to /// [optional] Title ID this player profile applies to
/// </summary> /// </summary>
[JsonPropertyName("TitleId")] [JsonPropertyName("TitleId")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string TitleId { get; set; } public string? TitleId { get; set; }
} }
@@ -10,19 +10,19 @@ public class FScriptExecutionError
/// </summary> /// </summary>
[JsonPropertyName("Error")] [JsonPropertyName("Error")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string Error { get; set; } public string? Error { get; set; }
/// <summary> /// <summary>
/// [optional] Details about the error /// [optional] Details about the error
/// </summary> /// </summary>
[JsonPropertyName("Message")] [JsonPropertyName("Message")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string Message { get; set; } public string? Message { get; set; }
/// <summary> /// <summary>
/// [optional] Point during the execution of the script at which the error occurred, if any /// [optional] Point during the execution of the script at which the error occurred, if any
/// </summary> /// </summary>
[JsonPropertyName("StackTrace")] [JsonPropertyName("StackTrace")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string StackTrace { get; set; } public string? StackTrace { get; set; }
} }
@@ -9,12 +9,12 @@ public class FTreatmentAssignment
/// </summary> /// </summary>
[JsonPropertyName("Variables")] [JsonPropertyName("Variables")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public List<FVariable> Variables { get; set; } public List<FVariable>? Variables { get; set; }
/// <summary> /// <summary>
/// [optional] List of the experiment variants. /// [optional] List of the experiment variants.
/// </summary> /// </summary>
[JsonPropertyName("Variants")] [JsonPropertyName("Variants")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public List<string> Variants { get; set; } public List<string>? Variants { get; set; }
} }
@@ -16,12 +16,12 @@ public class FUserDataRecord
/// </summary> /// </summary>
[JsonPropertyName("Permission")] [JsonPropertyName("Permission")]
[JsonConverter(typeof(JsonStringEnumConverter))] [JsonConverter(typeof(JsonStringEnumConverter))]
public UserDataPermission Permission { get; set; } public UserDataPermission? Permission { get; set; }
/// <summary> /// <summary>
/// [optional] Data stored for the specified user data key. /// [optional] Data stored for the specified user data key.
/// </summary> /// </summary>
[JsonPropertyName("Value")] [JsonPropertyName("Value")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string Value { get; set; } public string? Value { get; set; }
} }
@@ -8,12 +8,12 @@ public class FVariable
/// Name of the variable. /// Name of the variable.
/// </summary> /// </summary>
[JsonPropertyName("Name")] [JsonPropertyName("Name")]
public string Name { get; set; } public string Name { get; set; } = null!;
/// <summary> /// <summary>
/// [optional] Value of the variable. /// [optional] Value of the variable.
/// </summary> /// </summary>
[JsonPropertyName("Value")] [JsonPropertyName("Value")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string Value { get; set; } public string? Value { get; set; }
} }
@@ -5,6 +5,9 @@ namespace Prospect.Server.Api.Models.Client;
public class FAddGenericIDRequest public class FAddGenericIDRequest
{ {
/// <summary>
/// Generic service identifier to add to the player account.
/// </summary>
[JsonPropertyName("GenericId")] [JsonPropertyName("GenericId")]
public FGenericServiceId GenericId { get; set; } public FGenericServiceId GenericId { get; set; } = null!;
} }
@@ -16,7 +16,7 @@ public class FExecuteCloudScriptResult
/// </summary> /// </summary>
[JsonPropertyName("Error")] [JsonPropertyName("Error")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public FScriptExecutionError Error { get; set; } public FScriptExecutionError? Error { get; set; }
[JsonPropertyName("ExecutionTimeSeconds")] [JsonPropertyName("ExecutionTimeSeconds")]
public double? ExecutionTimeSeconds { get; set; } public double? ExecutionTimeSeconds { get; set; }
@@ -26,14 +26,14 @@ public class FExecuteCloudScriptResult
/// </summary> /// </summary>
[JsonPropertyName("FunctionName")] [JsonPropertyName("FunctionName")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string FunctionName { get; set; } public string? FunctionName { get; set; }
/// <summary> /// <summary>
/// [optional] The object returned from the CloudScript function, if any /// [optional] The object returned from the CloudScript function, if any
/// </summary> /// </summary>
[JsonPropertyName("FunctionResult")] [JsonPropertyName("FunctionResult")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public object FunctionResult { get; set; } public object? FunctionResult { get; set; }
/// <summary> /// <summary>
/// [optional] Flag indicating if the FunctionResult was too large and was subsequently dropped from this event. This only occurs if /// [optional] Flag indicating if the FunctionResult was too large and was subsequently dropped from this event. This only occurs if
@@ -55,7 +55,7 @@ public class FExecuteCloudScriptResult
/// </summary> /// </summary>
[JsonPropertyName("Logs")] [JsonPropertyName("Logs")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public List<FLogStatement> Logs { get; set; } public List<FLogStatement>? Logs { get; set; }
/// <summary> /// <summary>
/// [optional] Flag indicating if the logs were too large and were subsequently dropped from this event. This only occurs if the total /// [optional] Flag indicating if the logs were too large and were subsequently dropped from this event. This only occurs if the total
@@ -10,20 +10,20 @@ public class FExecuteCloudScriptServerRequest
/// </summary> /// </summary>
[JsonPropertyName("CustomTags")] [JsonPropertyName("CustomTags")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Dictionary<string, string> CustomTags { get; set; } public Dictionary<string, string>? CustomTags { get; set; }
/// <summary> /// <summary>
/// The name of the CloudScript function to execute /// The name of the CloudScript function to execute
/// </summary> /// </summary>
[JsonPropertyName("FunctionName")] [JsonPropertyName("FunctionName")]
public string FunctionName { get; set; } public string FunctionName { get; set; } = null!;
/// <summary> /// <summary>
/// [optional] Object that is passed in to the function as the first argument /// [optional] Object that is passed in to the function as the first argument
/// </summary> /// </summary>
[JsonPropertyName("FunctionParameter")] [JsonPropertyName("FunctionParameter")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string FunctionParameter { get; set; } public string? FunctionParameter { get; set; }
/// <summary> /// <summary>
/// [optional] Generate a 'player_executed_cloudscript' PlayStream event containing the results of the function execution and other /// [optional] Generate a 'player_executed_cloudscript' PlayStream event containing the results of the function execution and other
@@ -37,7 +37,7 @@ public class FExecuteCloudScriptServerRequest
/// The unique user identifier for the player on whose behalf the script is being run /// The unique user identifier for the player on whose behalf the script is being run
/// </summary> /// </summary>
[JsonPropertyName("PlayFabId")] [JsonPropertyName("PlayFabId")]
public string PlayFabId { get; set; } public string PlayFabId { get; set; } = null!;
/// <summary> /// <summary>
/// [optional] Option for which revision of the CloudScript to execute. 'Latest' executes the most recently created revision, 'Live' /// [optional] Option for which revision of the CloudScript to execute. 'Latest' executes the most recently created revision, 'Live'
@@ -10,27 +10,27 @@ public class FExecuteFunctionRequest
/// </summary> /// </summary>
[JsonPropertyName("CustomTags")] [JsonPropertyName("CustomTags")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Dictionary<string, string> CustomTags { get; set; } public Dictionary<string, string>? CustomTags { get; set; }
/// <summary> /// <summary>
/// [optional] The entity to perform this action on. /// [optional] The entity to perform this action on.
/// </summary> /// </summary>
[JsonPropertyName("Entity")] [JsonPropertyName("Entity")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public FEntityKey Entity { get; set; } public FEntityKey? Entity { get; set; }
/// <summary> /// <summary>
/// The name of the CloudScript function to execute /// The name of the CloudScript function to execute
/// </summary> /// </summary>
[JsonPropertyName("FunctionName")] [JsonPropertyName("FunctionName")]
public string FunctionName { get; set; } public string? FunctionName { get; set; }
/// <summary> /// <summary>
/// [optional] Object that is passed in to the function as the FunctionArgument field of the FunctionExecutionContext data structure /// [optional] Object that is passed in to the function as the FunctionArgument field of the FunctionExecutionContext data structure
/// </summary> /// </summary>
[JsonPropertyName("FunctionParameter")] [JsonPropertyName("FunctionParameter")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string FunctionParameter { get; set; } public string? FunctionParameter { get; set; }
/// <summary> /// <summary>
/// [optional] Generate a 'entity_executed_cloudscript_function' PlayStream event containing the results of the function execution and /// [optional] Generate a 'entity_executed_cloudscript_function' PlayStream event containing the results of the function execution and
@@ -10,7 +10,7 @@ public class FExecuteFunctionResult
/// </summary> /// </summary>
[JsonPropertyName("Error")] [JsonPropertyName("Error")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public FFunctionExecutionError Error { get; set; } public FFunctionExecutionError? Error { get; set; }
/// <summary> /// <summary>
/// The amount of time the function took to execute /// The amount of time the function took to execute
@@ -22,14 +22,14 @@ public class FExecuteFunctionResult
/// [optional] The name of the function that executed /// [optional] The name of the function that executed
/// </summary> /// </summary>
[JsonPropertyName("FunctionName")] [JsonPropertyName("FunctionName")]
public string FunctionName { get; set; } public string? FunctionName { get; set; }
/// <summary> /// <summary>
/// [optional] The object returned from the function, if any /// [optional] The object returned from the function, if any
/// </summary> /// </summary>
[JsonPropertyName("FunctionResult")] [JsonPropertyName("FunctionResult")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public object FunctionResult { get; set; } public object? FunctionResult { get; set; }
/// <summary> /// <summary>
/// [optional] Flag indicating if the FunctionResult was too large and was subsequently dropped from this event. /// [optional] Flag indicating if the FunctionResult was too large and was subsequently dropped from this event.
@@ -8,12 +8,12 @@ public class FGetTitleDataRequest
/// [optional] Specific keys to search for in the title data (leave null to get all keys) /// [optional] Specific keys to search for in the title data (leave null to get all keys)
/// </summary> /// </summary>
[JsonPropertyName("Keys")] [JsonPropertyName("Keys")]
public List<string> Keys { get; set; } public List<string>? Keys { get; set; }
/// <summary> /// <summary>
/// [optional] Name of the override. This value is ignored when used by the game client; otherwise, the overrides are applied /// [optional] Name of the override. This value is ignored when used by the game client; otherwise, the overrides are applied
/// automatically to the title data. /// automatically to the title data.
/// </summary> /// </summary>
[JsonPropertyName("OverrideLabel")] [JsonPropertyName("OverrideLabel")]
public string OverrideLabel { get; set; } public string? OverrideLabel { get; set; }
} }
@@ -8,5 +8,5 @@ public class FGetTitleDataResult
/// [optional] a dictionary object of key / value pairs /// [optional] a dictionary object of key / value pairs
/// </summary> /// </summary>
[JsonPropertyName("Data")] [JsonPropertyName("Data")]
public Dictionary<string, string> Data { get; set; } public Dictionary<string, string>? Data { get; set; }
} }
@@ -9,18 +9,18 @@ public class FGetUserDataRequest
/// version in the system is greater than this. /// version in the system is greater than this.
/// </summary> /// </summary>
[JsonPropertyName("IfChangedFromDataVersion")] [JsonPropertyName("IfChangedFromDataVersion")]
public List<uint> IfChangedFromDataVersion { get; set; } public List<uint>? IfChangedFromDataVersion { get; set; }
/// <summary> /// <summary>
/// [optional] List of unique keys to load from. /// [optional] List of unique keys to load from.
/// </summary> /// </summary>
[JsonPropertyName("Keys")] [JsonPropertyName("Keys")]
public List<string> Keys { get; set; } public List<string>? Keys { get; set; }
/// <summary> /// <summary>
/// [optional] Unique PlayFab identifier of the user to load data for. Optional, defaults to yourself if not set. When specified to a /// [optional] Unique PlayFab identifier of the user to load data for. Optional, defaults to yourself if not set. When specified to a
/// PlayFab id of another player, then this will only return public keys for that account. /// PlayFab id of another player, then this will only return public keys for that account.
/// </summary> /// </summary>
[JsonPropertyName("PlayFabId")] [JsonPropertyName("PlayFabId")]
public string PlayFabId { get; set; } public string? PlayFabId { get; set; }
} }
@@ -9,12 +9,12 @@ public class FGetUserDataResult
/// [optional] User specific data for this title. /// [optional] User specific data for this title.
/// </summary> /// </summary>
[JsonPropertyName("Data")] [JsonPropertyName("Data")]
public Dictionary<string, FUserDataRecord> Data { get; set; } public Dictionary<string, FUserDataRecord>? Data { get; set; }
/// <summary> /// <summary>
/// [optional] Indicates the current version of the data that has been set. This is incremented with every set call for that type of /// [optional] Indicates the current version of the data that has been set. This is incremented with every set call for that type of
/// data (read-only, internal, etc). This version can be provided in Get calls to find updated data. /// data (read-only, internal, etc). This version can be provided in Get calls to find updated data.
/// </summary> /// </summary>
[JsonPropertyName("DataVersion")] [JsonPropertyName("DataVersion")]
public uint DataVersion { get; set; } public uint? DataVersion { get; set; }
} }
@@ -9,5 +9,5 @@ public class FGetUserInventoryRequest
/// </summary> /// </summary>
[JsonPropertyName("CustomTags")] [JsonPropertyName("CustomTags")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Dictionary<string, string> CustomTags { get; set; } public Dictionary<string, string>? CustomTags { get; set; }
} }
@@ -10,19 +10,19 @@ public class FGetUserInventoryResult
/// </summary> /// </summary>
[JsonPropertyName("Inventory")] [JsonPropertyName("Inventory")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public List<FItemInstance> Inventory { get; set; } public List<FItemInstance>? Inventory { get; set; }
/// <summary> /// <summary>
/// [optional] Array of virtual currency balance(s) belonging to the user. /// [optional] Array of virtual currency balance(s) belonging to the user.
/// </summary> /// </summary>
[JsonPropertyName("VirtualCurrency")] [JsonPropertyName("VirtualCurrency")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Dictionary<string, int> VirtualCurrency { get; set; } public Dictionary<string, int>? VirtualCurrency { get; set; }
/// <summary> /// <summary>
/// [optional] Array of virtual currency balance(s) belonging to the user. /// [optional] Array of virtual currency balance(s) belonging to the user.
/// </summary> /// </summary>
[JsonPropertyName("VirtualCurrencyRechargeTimes")] [JsonPropertyName("VirtualCurrencyRechargeTimes")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Dictionary<string, FVirtualCurrencyRechargeTime> VirtualCurrencyRechargeTimes { get; set; } public Dictionary<string, FVirtualCurrencyRechargeTime>? VirtualCurrencyRechargeTimes { get; set; }
} }
@@ -0,0 +1,50 @@
using System.Text.Json.Serialization;
using Prospect.Server.Api.Models.Client.Data;
namespace Prospect.Server.Api.Models.Client;
public class FLoginWithSteamRequest
{
/// <summary>
/// [optional] Automatically create a PlayFab account if one is not currently linked to this ID.
/// </summary>
[JsonPropertyName("CreateAccount")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public bool? CreateAccount { get; set; }
/// <summary>
/// [optional] The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
/// </summary>
[JsonPropertyName("CustomTags")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Dictionary<string, string>? CustomTags { get; set; }
/// <summary>
/// [optional] Base64 encoded body that is encrypted with the Title's public RSA key (Enterprise Only).
/// </summary>
[JsonPropertyName("EncryptedRequest")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? EncryptedRequest { get; set; }
/// <summary>
/// [optional] Flags for which pieces of info to return for the user.
/// </summary>
[JsonPropertyName("InfoRequestParameters")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public FGetPlayerCombinedInfoRequestParams? InfoRequestParameters { get; set; }
/// <summary>
/// [optional] Player secret that is used to verify API request signatures (Enterprise Only).
/// </summary>
[JsonPropertyName("PlayerSecret")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? PlayerSecret { get; set; }
/// <summary>
/// [optional] Authentication token for the user, returned as a byte array from Steam, and converted to a string (for example, the byte
/// 0x08 should become "08").
/// </summary>
[JsonPropertyName("SteamTicket")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? SteamTicket { get; set; }
}
@@ -11,13 +11,13 @@ public class FServerLoginResult
/// </summary> /// </summary>
[JsonPropertyName("EntityToken")] [JsonPropertyName("EntityToken")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public FEntityTokenResponse EntityToken { get; set; } public FEntityTokenResponse? EntityToken { get; set; }
/// <summary> /// <summary>
/// [optional] Results for requested info. /// [optional] Results for requested info.
/// </summary> /// </summary>
[JsonPropertyName("InfoResultPayload")] [JsonPropertyName("InfoResultPayload")]
public FGetPlayerCombinedInfoResultPayload InfoResultPayload { get; set; } public FGetPlayerCombinedInfoResultPayload? InfoResultPayload { get; set; }
/// <summary> /// <summary>
/// [optional] The time of this user's previous login. If there was no previous login, then it's DateTime.MinValue /// [optional] The time of this user's previous login. If there was no previous login, then it's DateTime.MinValue
@@ -37,26 +37,26 @@ public class FServerLoginResult
/// </summary> /// </summary>
[JsonPropertyName("PlayFabId")] [JsonPropertyName("PlayFabId")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string PlayFabId { get; set; } public string? PlayFabId { get; set; }
/// <summary> /// <summary>
/// [optional] Unique token authorizing the user and game at the server level, for the current session. /// [optional] Unique token authorizing the user and game at the server level, for the current session.
/// </summary> /// </summary>
[JsonPropertyName("SessionTicket")] [JsonPropertyName("SessionTicket")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string SessionTicket { get; set; } public string? SessionTicket { get; set; }
/// <summary> /// <summary>
/// [optional] Settings specific to this user. /// [optional] Settings specific to this user.
/// </summary> /// </summary>
[JsonPropertyName("SettingsForUser")] [JsonPropertyName("SettingsForUser")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public FUserSettings SettingsForUser { get; set; } public FUserSettings? SettingsForUser { get; set; }
/// <summary> /// <summary>
/// [optional] The experimentation treatments for this user at the time of login. /// [optional] The experimentation treatments for this user at the time of login.
/// </summary> /// </summary>
[JsonPropertyName("TreatmentAssignment")] [JsonPropertyName("TreatmentAssignment")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public FTreatmentAssignment TreatmentAssignment { get; set; } public FTreatmentAssignment? TreatmentAssignment { get; set; }
} }
@@ -10,19 +10,19 @@ public class FUpdateUserDataRequest
/// </summary> /// </summary>
[JsonPropertyName("CustomTags")] [JsonPropertyName("CustomTags")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Dictionary<string, string> CustomTags { get; set; } public Dictionary<string, string>? CustomTags { get; set; }
/// <summary> /// <summary>
/// [optional] Key-value pairs to be written to the custom data. Note that keys are trimmed of whitespace, are limited in size, and may /// [optional] Key-value pairs to be written to the custom data. Note that keys are trimmed of whitespace, are limited in size, and may
/// not begin with a '!' character or be null. /// not begin with a '!' character or be null.
/// </summary> /// </summary>
public Dictionary<string, string> Data { get; set; } public Dictionary<string, string>? Data { get; set; }
/// <summary> /// <summary>
/// [optional] Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language /// [optional] Optional list of Data-keys to remove from UserData. Some SDKs cannot insert null-values into Data due to language
/// constraints. Use this to delete the keys directly. /// constraints. Use this to delete the keys directly.
/// </summary> /// </summary>
public List<string> KeysToRemove { get; set; } public List<string>? KeysToRemove { get; set; }
/// <summary> /// <summary>
/// [optional] Permission to be applied to all user data keys written in this request. Defaults to "private" if not set. /// [optional] Permission to be applied to all user data keys written in this request. Defaults to "private" if not set.
@@ -9,11 +9,11 @@ public class FUpdateUserTitleDisplayNameRequest
/// </summary> /// </summary>
[JsonPropertyName("CustomTags")] [JsonPropertyName("CustomTags")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Dictionary<string, string> CustomTags { get; set; } public Dictionary<string, string>? CustomTags { get; set; }
/// <summary> /// <summary>
/// New title display name for the user - must be between 3 and 25 characters. /// New title display name for the user - must be between 3 and 25 characters.
/// </summary> /// </summary>
[JsonPropertyName("DisplayName")] [JsonPropertyName("DisplayName")]
public string DisplayName { get; set; } public string DisplayName { get; set; } = null!;
} }
@@ -5,5 +5,5 @@ public class FUpdateUserTitleDisplayNameResult
/// <summary> /// <summary>
/// [optional] Current title display name for the user (this will be the original display name if the rename attempt failed). /// [optional] Current title display name for the user (this will be the original display name if the rename attempt failed).
/// </summary> /// </summary>
public string DisplayName { get; set; } public string? DisplayName { get; set; }
} }
@@ -5,8 +5,8 @@ namespace Prospect.Server.Api.Models.CloudScript.Data;
public class FYActiveContractPlayerData public class FYActiveContractPlayerData
{ {
[JsonPropertyName("contractId")] [JsonPropertyName("contractId")]
public string ContractId { get; set; } public string ContractId { get; set; } = null!;
[JsonPropertyName("progress")] [JsonPropertyName("progress")]
public List<int> Progress { get; set; } public List<int> Progress { get; set; } = null!;
} }
@@ -5,7 +5,7 @@ namespace Prospect.Server.Api.Models.CloudScript.Data;
public class FYFactionContractData public class FYFactionContractData
{ {
[JsonPropertyName("contractId")] [JsonPropertyName("contractId")]
public string ContractId { get; set; } public string ContractId { get; set; } = null!;
[JsonPropertyName("contractIsLockedDueToLowFactionReputation")] [JsonPropertyName("contractIsLockedDueToLowFactionReputation")]
public bool ContractIsLockedDueToLowFactionReputation { get; set; } public bool ContractIsLockedDueToLowFactionReputation { get; set; }
@@ -5,8 +5,8 @@ namespace Prospect.Server.Api.Models.CloudScript.Data;
public class FYFactionContractsData public class FYFactionContractsData
{ {
[JsonPropertyName("factionId")] [JsonPropertyName("factionId")]
public string FactionId { get; set; } public string FactionId { get; set; } = null!;
[JsonPropertyName("contracts")] [JsonPropertyName("contracts")]
public List<FYFactionContractData> Contracts { get; set; } public List<FYFactionContractData> Contracts { get; set; } = null!;
} }
@@ -5,8 +5,8 @@ namespace Prospect.Server.Api.Models.CloudScript.Data;
public class FYFactionsContractsData public class FYFactionsContractsData
{ {
[JsonPropertyName("boards")] [JsonPropertyName("boards")]
public List<FYFactionContractsData> Boards { get; set; } public List<FYFactionContractsData> Boards { get; set; } = null!;
[JsonPropertyName("lastBoardRefreshTimeUtc")] [JsonPropertyName("lastBoardRefreshTimeUtc")]
public FYTimestamp LastBoardRefreshTimeUtc { get; set; } public FYTimestamp LastBoardRefreshTimeUtc { get; set; } = null!;
} }
@@ -5,7 +5,7 @@ namespace Prospect.Server.Api.Models.CloudScript.Data;
public class FYItemCurrentlyBeingCrafted public class FYItemCurrentlyBeingCrafted
{ {
[JsonPropertyName("itemId")] [JsonPropertyName("itemId")]
public string ItemId { get; set; } public string ItemId { get; set; } = null!;
[JsonPropertyName("itemRarity")] [JsonPropertyName("itemRarity")]
public int ItemRarity { get; set; } public int ItemRarity { get; set; }
@@ -14,5 +14,5 @@ public class FYItemCurrentlyBeingCrafted
public int PurchaseAmount { get; set; } public int PurchaseAmount { get; set; }
[JsonPropertyName("utcTimestampWhenCraftingStarted")] [JsonPropertyName("utcTimestampWhenCraftingStarted")]
public FYTimestamp UtcTimestampWhenCraftingStarted { get; set; } public FYTimestamp UtcTimestampWhenCraftingStarted { get; set; } = null!;
} }
@@ -6,11 +6,11 @@ namespace Prospect.Server.Api.Models.CloudScript;
public class FYGetCraftingInProgressDataResult public class FYGetCraftingInProgressDataResult
{ {
[JsonPropertyName("userId")] [JsonPropertyName("userId")]
public string UserId { get; set; } public string UserId { get; set; } = null!;
[JsonPropertyName("error")] [JsonPropertyName("error")]
public string Error { get; set; } public string Error { get; set; } = null!;
[JsonPropertyName("itemCurrentlyBeingCrafted")] [JsonPropertyName("itemCurrentlyBeingCrafted")]
public FYItemCurrentlyBeingCrafted ItemCurrentlyBeingCrafted { get; set; } public FYItemCurrentlyBeingCrafted ItemCurrentlyBeingCrafted { get; set; } = null!;
} }
@@ -6,16 +6,16 @@ namespace Prospect.Server.Api.Models.CloudScript;
public class FYGetPlayerContractsResult public class FYGetPlayerContractsResult
{ {
[JsonPropertyName("userId")] [JsonPropertyName("userId")]
public string UserId { get; set; } public string UserId { get; set; } = null!;
[JsonPropertyName("error")] [JsonPropertyName("error")]
public string Error { get; set; } public string? Error { get; set; }
[JsonPropertyName("activeContracts")] [JsonPropertyName("activeContracts")]
public List<FYActiveContractPlayerData> ActiveContracts { get; set; } public List<FYActiveContractPlayerData> ActiveContracts { get; set; } = null!;
[JsonPropertyName("factionsContracts")] [JsonPropertyName("factionsContracts")]
public FYFactionsContractsData FactionsContracts { get; set; } public FYFactionsContractsData FactionsContracts { get; set; } = null!;
[JsonPropertyName("refreshHours24UtcFromBackend")] [JsonPropertyName("refreshHours24UtcFromBackend")]
public int RefreshHours24UtcFromBackend { get; set; } public int RefreshHours24UtcFromBackend { get; set; }
@@ -0,0 +1,20 @@
using System.Text.Json.Serialization;
namespace Prospect.Server.Api.Models.Multiplayer.Data;
public class FQosServer
{
/// <summary>
/// [optional] The region the QoS server is located in.
/// </summary>
[JsonPropertyName("Error")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? Region { get; set; }
/// <summary>
/// [optional] The QoS server URL.
/// </summary>
[JsonPropertyName("ServerUrl")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? ServerUrl { get; set; }
}
@@ -0,0 +1,20 @@
using System.Text.Json.Serialization;
namespace Prospect.Server.Api.Models.Multiplayer;
public class FListQosServersForTitleRequest
{
/// <summary>
/// [optional] The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
/// </summary>
[JsonPropertyName("CustomTags")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Dictionary<string, string>? CustomTags { get; set; }
/// <summary>
/// [optional] Indicates that the response should contain Qos servers for all regions, including those where there are no builds
/// deployed for the title.
/// </summary>
[JsonPropertyName("IncludeAllRegions")]
public bool? IncludeAllRegions { get; set; }
}
@@ -0,0 +1,28 @@
using System.Text.Json.Serialization;
using Prospect.Server.Api.Models.Multiplayer.Data;
namespace Prospect.Server.Api.Models.Multiplayer;
public class FListQosServersForTitleResponse
{
/// <summary>
/// The page size on the response.
/// </summary>
[JsonPropertyName("PageSize")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public int PageSize { get; set; }
/// <summary>
/// [optional] The list of QoS servers.
/// </summary>
[JsonPropertyName("QosServers")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public List<FQosServer>? QosServers { get; set; }
/// <summary>
/// [optional] The skip token for the paged response.
/// </summary>
[JsonPropertyName("SkipToken")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? SkipToken { get; set; }
}
@@ -3,6 +3,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>true</ImplicitUsings> <ImplicitUsings>true</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>