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,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.
/// </summary>
[JsonPropertyName("Id")]
public string Id { get; set; }
public string Id { get; set; } = null!;
/// <summary>
/// [optional] Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types
/// </summary>
[JsonPropertyName("Type")]
public string Type { get; set; }
public string? Type { get; set; }
// Not in PlayFab SDK
[JsonPropertyName("TypeString")]
public string TypeString { get; set; }
[JsonPropertyName("TypeString")]
public string TypeString { get; set; } = null!;
}
@@ -9,14 +9,14 @@ public class FEntityTokenResponse
/// </summary>
[JsonPropertyName("Entity")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public FEntityKey Entity { get; set; }
public FEntityKey? Entity { get; set; }
/// <summary>
/// [optional] The token used to set X-EntityToken for all entity based API calls.
/// </summary>
[JsonPropertyName("EntityToken")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string EntityToken { get; set; }
public string? EntityToken { get; set; }
/// <summary>
/// [optional] The time the token will expire, if it is an expiring token, in UTC.
@@ -10,19 +10,19 @@ public class FFunctionExecutionError
/// </summary>
[JsonPropertyName("Error")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string Error { get; set; }
public string? Error { get; set; }
/// <summary>
/// [optional] Details about the error
/// </summary>
[JsonPropertyName("Message")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string Message { get; set; }
public string? Message { get; set; }
/// <summary>
/// [optional] Point during the execution of the function at which the error occurred, if any
/// </summary>
[JsonPropertyName("StackTrace")]
[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.
/// </summary>
[JsonPropertyName("ServiceName")]
public string ServiceName { get; set; }
public string ServiceName { get; set; } = null!;
/// <summary>
/// Unique identifier of the player in that service.
/// </summary>
[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>
[JsonPropertyName("CharacterInventories")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public List<object> CharacterInventories { get; set; }
public List<object>? CharacterInventories { get; set; }
// TArray<FCharacterResult> CharacterList;
@@ -21,7 +21,7 @@ public class FGetPlayerCombinedInfoResultPayload
/// </summary>
[JsonPropertyName("PlayerProfile")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public FPlayerProfileModel PlayerProfile { get; set; }
public FPlayerProfileModel? PlayerProfile { get; set; }
// TArray<FStatisticValue> PlayerStatistics;
@@ -41,7 +41,7 @@ public class FGetPlayerCombinedInfoResultPayload
/// </summary>
[JsonPropertyName("UserInventory")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public List<object> UserInventory { get; set; }
public List<object>? UserInventory { get; set; }
// TMap<FString, FUserDataRecord> UserReadOnlyData;
@@ -9,14 +9,14 @@ public class FItemInstance
/// </summary>
[JsonPropertyName("Annotation")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string Annotation { get; set; }
public string? Annotation { get; set; }
/// <summary>
/// [optional] Array of unique items that were awarded when this catalog item was purchased.
/// </summary>
[JsonPropertyName("BundleContents")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public List<string> BundleContents { get; set; }
public List<string>? BundleContents { get; set; }
/// <summary>
/// [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>
[JsonPropertyName("BundleParent")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string BundleParent { get; set; }
public string? BundleParent { get; set; }
/// <summary>
/// [optional] Catalog version for the inventory item, when this instance was created.
/// </summary>
[JsonPropertyName("CatalogVersion")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string CatalogVersion { get; set; }
public string? CatalogVersion { get; set; }
/// <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
@@ -39,14 +39,14 @@ public class FItemInstance
/// </summary>
[JsonPropertyName("CustomData")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Dictionary<string, string> CustomData { get; set; }
public Dictionary<string, string>? CustomData { get; set; }
/// <summary>
/// [optional] CatalogItem.DisplayName at the time this item was purchased.
/// </summary>
[JsonPropertyName("DisplayName")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string DisplayName { get; set; }
public string? DisplayName { get; set; }
/// <summary>
/// [optional] Timestamp for when this instance will expire.
@@ -60,21 +60,21 @@ public class FItemInstance
/// </summary>
[JsonPropertyName("ItemClass")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string ItemClass { get; set; }
public string? ItemClass { get; set; }
/// <summary>
/// [optional] Unique identifier for the inventory item, as defined in the catalog.
/// </summary>
[JsonPropertyName("ItemId")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string ItemId { get; set; }
public string? ItemId { get; set; }
/// <summary>
/// [optional] Unique item identifier for this specific instance of the item.
/// </summary>
[JsonPropertyName("ItemInstanceId")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string ItemInstanceId { get; set; }
public string? ItemInstanceId { get; set; }
/// <summary>
/// [optional] Timestamp for when this instance was purchased.
@@ -95,7 +95,7 @@ public class FItemInstance
/// </summary>
[JsonPropertyName("UnitCurrency")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string UnitCurrency { get; set; }
public string? UnitCurrency { get; set; }
/// <summary>
/// Cost of the catalog item in the given currency. Not available when granting items.
@@ -9,19 +9,19 @@ public class FLogStatement
/// </summary>
[JsonPropertyName("Data")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public object Data { get; set; }
public object? Data { get; set; }
/// <summary>
/// [optional] 'Debug', 'Info', or 'Error'
/// </summary>
[JsonPropertyName("Level")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string Level { get; set; }
public string? Level { get; set; }
/// <summary>
/// [optional] undefined
/// </summary>
[JsonPropertyName("Message")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string Message { get; set; }
public string? Message { get; set; }
}
@@ -9,26 +9,26 @@ public class FPlayerProfileModel
/// </summary>
[JsonPropertyName("DisplayName")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string DisplayName { get; set; }
public string? DisplayName { get; set; }
/// <summary>
/// [optional] PlayFab player account unique identifier
/// </summary>
[JsonPropertyName("PlayerId")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string PlayerId { get; set; }
public string? PlayerId { get; set; }
/// <summary>
/// [optional] Publisher this player belongs to
/// </summary>
[JsonPropertyName("PublisherId")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string PublisherId { get; set; }
public string? PublisherId { get; set; }
/// <summary>
/// [optional] Title ID this player profile applies to
/// </summary>
[JsonPropertyName("TitleId")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string TitleId { get; set; }
public string? TitleId { get; set; }
}
@@ -10,19 +10,19 @@ public class FScriptExecutionError
/// </summary>
[JsonPropertyName("Error")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string Error { get; set; }
public string? Error { get; set; }
/// <summary>
/// [optional] Details about the error
/// </summary>
[JsonPropertyName("Message")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string Message { get; set; }
public string? Message { get; set; }
/// <summary>
/// [optional] Point during the execution of the script at which the error occurred, if any
/// </summary>
[JsonPropertyName("StackTrace")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string StackTrace { get; set; }
public string? StackTrace { get; set; }
}
@@ -9,12 +9,12 @@ public class FTreatmentAssignment
/// </summary>
[JsonPropertyName("Variables")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public List<FVariable> Variables { get; set; }
public List<FVariable>? Variables { get; set; }
/// <summary>
/// [optional] List of the experiment variants.
/// </summary>
[JsonPropertyName("Variants")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public List<string> Variants { get; set; }
public List<string>? Variants { get; set; }
}
@@ -16,12 +16,12 @@ public class FUserDataRecord
/// </summary>
[JsonPropertyName("Permission")]
[JsonConverter(typeof(JsonStringEnumConverter))]
public UserDataPermission Permission { get; set; }
public UserDataPermission? Permission { get; set; }
/// <summary>
/// [optional] Data stored for the specified user data key.
/// </summary>
[JsonPropertyName("Value")]
[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.
/// </summary>
[JsonPropertyName("Name")]
public string Name { get; set; }
public string Name { get; set; } = null!;
/// <summary>
/// [optional] Value of the variable.
/// </summary>
[JsonPropertyName("Value")]
[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
{
/// <summary>
/// Generic service identifier to add to the player account.
/// </summary>
[JsonPropertyName("GenericId")]
public FGenericServiceId GenericId { get; set; }
public FGenericServiceId GenericId { get; set; } = null!;
}
@@ -16,7 +16,7 @@ public class FExecuteCloudScriptResult
/// </summary>
[JsonPropertyName("Error")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public FScriptExecutionError Error { get; set; }
public FScriptExecutionError? Error { get; set; }
[JsonPropertyName("ExecutionTimeSeconds")]
public double? ExecutionTimeSeconds { get; set; }
@@ -26,14 +26,14 @@ public class FExecuteCloudScriptResult
/// </summary>
[JsonPropertyName("FunctionName")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string FunctionName { get; set; }
public string? FunctionName { get; set; }
/// <summary>
/// [optional] The object returned from the CloudScript function, if any
/// </summary>
[JsonPropertyName("FunctionResult")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public object FunctionResult { get; set; }
public object? FunctionResult { get; set; }
/// <summary>
/// [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>
[JsonPropertyName("Logs")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public List<FLogStatement> Logs { get; set; }
public List<FLogStatement>? Logs { get; set; }
/// <summary>
/// [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>
[JsonPropertyName("CustomTags")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Dictionary<string, string> CustomTags { get; set; }
public Dictionary<string, string>? CustomTags { get; set; }
/// <summary>
/// The name of the CloudScript function to execute
/// </summary>
[JsonPropertyName("FunctionName")]
public string FunctionName { get; set; }
public string FunctionName { get; set; } = null!;
/// <summary>
/// [optional] Object that is passed in to the function as the first argument
/// </summary>
[JsonPropertyName("FunctionParameter")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string FunctionParameter { get; set; }
public string? FunctionParameter { get; set; }
/// <summary>
/// [optional] Generate a 'player_executed_cloudscript' PlayStream event containing the results of the function execution and other
@@ -32,12 +32,12 @@ public class FExecuteCloudScriptServerRequest
[JsonPropertyName("GeneratePlayStreamEvent")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public bool? GeneratePlayStreamEvent { get; set; }
/// <summary>
/// The unique user identifier for the player on whose behalf the script is being run
/// </summary>
[JsonPropertyName("PlayFabId")]
public string PlayFabId { get; set; }
public string PlayFabId { get; set; } = null!;
/// <summary>
/// [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>
[JsonPropertyName("CustomTags")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Dictionary<string, string> CustomTags { get; set; }
public Dictionary<string, string>? CustomTags { get; set; }
/// <summary>
/// [optional] The entity to perform this action on.
/// </summary>
[JsonPropertyName("Entity")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public FEntityKey Entity { get; set; }
public FEntityKey? Entity { get; set; }
/// <summary>
/// The name of the CloudScript function to execute
/// </summary>
[JsonPropertyName("FunctionName")]
public string FunctionName { get; set; }
public string? FunctionName { get; set; }
/// <summary>
/// [optional] Object that is passed in to the function as the FunctionArgument field of the FunctionExecutionContext data structure
/// </summary>
[JsonPropertyName("FunctionParameter")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string FunctionParameter { get; set; }
public string? FunctionParameter { get; set; }
/// <summary>
/// [optional] Generate a 'entity_executed_cloudscript_function' PlayStream event containing the results of the function execution and
@@ -10,8 +10,8 @@ public class FExecuteFunctionResult
/// </summary>
[JsonPropertyName("Error")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public FFunctionExecutionError Error { get; set; }
public FFunctionExecutionError? Error { get; set; }
/// <summary>
/// The amount of time the function took to execute
/// </summary>
@@ -22,14 +22,14 @@ public class FExecuteFunctionResult
/// [optional] The name of the function that executed
/// </summary>
[JsonPropertyName("FunctionName")]
public string FunctionName { get; set; }
public string? FunctionName { get; set; }
/// <summary>
/// [optional] The object returned from the function, if any
/// </summary>
[JsonPropertyName("FunctionResult")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public object FunctionResult { get; set; }
public object? FunctionResult { get; set; }
/// <summary>
/// [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)
/// </summary>
[JsonPropertyName("Keys")]
public List<string> Keys { get; set; }
public List<string>? Keys { get; set; }
/// <summary>
/// [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.
/// </summary>
[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
/// </summary>
[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.
/// </summary>
[JsonPropertyName("IfChangedFromDataVersion")]
public List<uint> IfChangedFromDataVersion { get; set; }
public List<uint>? IfChangedFromDataVersion { get; set; }
/// <summary>
/// [optional] List of unique keys to load from.
/// </summary>
[JsonPropertyName("Keys")]
public List<string> Keys { get; set; }
public List<string>? Keys { get; set; }
/// <summary>
/// [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.
/// </summary>
[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.
/// </summary>
[JsonPropertyName("Data")]
public Dictionary<string, FUserDataRecord> Data { get; set; }
public Dictionary<string, FUserDataRecord>? Data { get; set; }
/// <summary>
/// [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.
/// </summary>
[JsonPropertyName("DataVersion")]
public uint DataVersion { get; set; }
public uint? DataVersion { get; set; }
}
@@ -9,5 +9,5 @@ public class FGetUserInventoryRequest
/// </summary>
[JsonPropertyName("CustomTags")]
[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>
[JsonPropertyName("Inventory")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public List<FItemInstance> Inventory { get; set; }
public List<FItemInstance>? Inventory { get; set; }
/// <summary>
/// [optional] Array of virtual currency balance(s) belonging to the user.
/// </summary>
[JsonPropertyName("VirtualCurrency")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Dictionary<string, int> VirtualCurrency { get; set; }
public Dictionary<string, int>? VirtualCurrency { get; set; }
/// <summary>
/// [optional] Array of virtual currency balance(s) belonging to the user.
/// </summary>
[JsonPropertyName("VirtualCurrencyRechargeTimes")]
[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>
[JsonPropertyName("EntityToken")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public FEntityTokenResponse EntityToken { get; set; }
public FEntityTokenResponse? EntityToken { get; set; }
/// <summary>
/// [optional] Results for requested info.
/// </summary>
[JsonPropertyName("InfoResultPayload")]
public FGetPlayerCombinedInfoResultPayload InfoResultPayload { get; set; }
public FGetPlayerCombinedInfoResultPayload? InfoResultPayload { get; set; }
/// <summary>
/// [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>
[JsonPropertyName("PlayFabId")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string PlayFabId { get; set; }
public string? PlayFabId { get; set; }
/// <summary>
/// [optional] Unique token authorizing the user and game at the server level, for the current session.
/// </summary>
[JsonPropertyName("SessionTicket")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string SessionTicket { get; set; }
public string? SessionTicket { get; set; }
/// <summary>
/// [optional] Settings specific to this user.
/// </summary>
[JsonPropertyName("SettingsForUser")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public FUserSettings SettingsForUser { get; set; }
public FUserSettings? SettingsForUser { get; set; }
/// <summary>
/// [optional] The experimentation treatments for this user at the time of login.
/// </summary>
[JsonPropertyName("TreatmentAssignment")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public FTreatmentAssignment TreatmentAssignment { get; set; }
public FTreatmentAssignment? TreatmentAssignment { get; set; }
}
@@ -10,19 +10,19 @@ public class FUpdateUserDataRequest
/// </summary>
[JsonPropertyName("CustomTags")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Dictionary<string, string> CustomTags { get; set; }
public Dictionary<string, string>? CustomTags { get; set; }
/// <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
/// not begin with a '!' character or be null.
/// </summary>
public Dictionary<string, string> Data { get; set; }
public Dictionary<string, string>? Data { get; set; }
/// <summary>
/// [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.
/// </summary>
public List<string> KeysToRemove { get; set; }
public List<string>? KeysToRemove { get; set; }
/// <summary>
/// [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>
[JsonPropertyName("CustomTags")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Dictionary<string, string> CustomTags { get; set; }
public Dictionary<string, string>? CustomTags { get; set; }
/// <summary>
/// New title display name for the user - must be between 3 and 25 characters.
/// </summary>
[JsonPropertyName("DisplayName")]
public string DisplayName { get; set; }
public string DisplayName { get; set; } = null!;
}
@@ -5,5 +5,5 @@ public class FUpdateUserTitleDisplayNameResult
/// <summary>
/// [optional] Current title display name for the user (this will be the original display name if the rename attempt failed).
/// </summary>
public string DisplayName { get; set; }
public string? DisplayName { get; set; }
}