![]() |
LootLocker Unreal SDK 10.4.0
Game backend SDK for Unreal Engine
|
Represents a single typed metadata entry with a key, value type, tags, and access level, along with helper methods for reading and writing the value. More...
#include <LootLockerMetadataRequestHandler.h>
Public Member Functions | |
| bool | TryGetValueAsString (FString &Output) const |
| Get the value as a String. | |
| bool | TryGetValueAsFloat (float &Output) const |
| Get the value as a float. | |
| bool | TryGetValueAsInteger (int &Output) const |
| Get the value as an integer. | |
| bool | TryGetValueAsBool (bool &Output) const |
| Get the value as a boolean. | |
| bool | TryGetRawValue (TSharedPtr< FJsonValue > &Output) const |
| Get the value as an unparsed json value. | |
| bool | TryGetSerializedValue (FString &Output) const |
| Get the value in a json string format. | |
| bool | TryGetValueAsJsonObject (TSharedPtr< FJsonObject > &Output) const |
| Get the value as a Json Object. | |
| bool | TryGetValueAsJsonArray (TArray< TSharedPtr< FJsonValue > > &Output) const |
| Get the value as a Json Array. | |
| bool | TryGetValueAsBase64 (FLootLockerMetadataBase64Value &Output) const |
| Get the value as a LootLockerMetadataBase64Value object. | |
| void | SetValueAsString (const FString &Value) |
| Set the value as a String. | |
| void | SetValueAsFloat (const float &Value) |
| Set the value as a float. | |
| void | SetValueAsInteger (const int &Value) |
| Set the value as an integer. | |
| void | SetValueAsBool (const bool &Value) |
| Set the value as a bool. | |
| void | SetRawValue (const TSharedPtr< FJsonValue > &Value) |
| Set the value as a JsonValue. | |
| template<typename T > | |
| bool | SetValueAsUStruct (const T &Value) |
| Set the value as the provided UStruct object. | |
| void | SetValueAsJsonObject (const FJsonObject &Value) |
| Set the value as a Json Object. | |
| void | SetValueAsJsonArray (const TArray< TSharedPtr< FJsonValue > > &Value) |
| Set the value as a Json Array. | |
| void | SetValueAsBase64 (const FLootLockerMetadataBase64Value &Value) |
| Set the value as a Base64 object. | |
| void | _INTERNAL_SetJsonRepresentation (const FJsonObject &obj) |
Static Public Member Functions | |
| static FLootLockerMetadataEntry | MakeStringEntry (const FString &Key, const TArray< FString > &Tags, const TArray< FString > &Access, const FString &Value) |
| Factory method that makes an FLootLockerMetadataEntry with a String Value. | |
| static FLootLockerMetadataEntry | MakeFloatEntry (const FString &Key, const TArray< FString > &Tags, const TArray< FString > &Access, const float &Value) |
| Factory method that makes an FLootLockerMetadataEntry with a Float Value. | |
| static FLootLockerMetadataEntry | MakeIntegerEntry (const FString &Key, const TArray< FString > &Tags, const TArray< FString > &Access, const int Value) |
| Factory method that makes an FLootLockerMetadataEntry with an Integer Value. | |
| static FLootLockerMetadataEntry | MakeBoolEntry (const FString &Key, const TArray< FString > &Tags, const TArray< FString > &Access, const bool Value) |
| Factory method that makes an FLootLockerMetadataEntry with a Bool Value. | |
| static FLootLockerMetadataEntry | MakeJsonValueEntry (const FString &Key, const TArray< FString > &Tags, const TArray< FString > &Access, const ELootLockerMetadataTypes Type, const TSharedPtr< FJsonValue > Value) |
| Factory method that makes an FLootLockerMetadataEntry with a JsonValue Value. | |
| static FLootLockerMetadataEntry | MakeJsonObjectEntry (const FString &Key, const TArray< FString > &Tags, const TArray< FString > &Access, const FJsonObject &Value) |
| Factory method that makes an FLootLockerMetadataEntry with a JsonObject Value. | |
| static FLootLockerMetadataEntry | MakeJsonArrayEntry (const FString &Key, const TArray< FString > &Tags, const TArray< FString > &Access, const TArray< TSharedPtr< FJsonValue > > &Value) |
| Factory method that makes an FLootLockerMetadataEntry with a JsonArray Value. | |
| static FLootLockerMetadataEntry | MakeBase64Entry (const FString &Key, const TArray< FString > &Tags, const TArray< FString > &Access, const FLootLockerMetadataBase64Value &Value) |
| Factory method that makes an FLootLockerMetadataEntry with a Base64 Value. | |
| static FLootLockerMetadataEntry | MakeEntryExceptValue (const FString &Key, const TArray< FString > &Tags, const TArray< FString > &Access, const ELootLockerMetadataTypes Type) |
Data Fields | |
| FString | Key = "" |
| The metadata key. | |
| ELootLockerMetadataTypes | Type = ELootLockerMetadataTypes::String |
| The type of value this metadata contains. | |
| TArray< FString > | Tags |
| List of tags applied to this metadata. | |
| TArray< FString > | Access |
| The access level set for this metadata entry. | |
Represents a single typed metadata entry with a key, value type, tags, and access level, along with helper methods for reading and writing the value.
| void FLootLockerMetadataEntry::_INTERNAL_SetJsonRepresentation | ( | const FJsonObject & | obj | ) |
|
static |
Factory method that makes an FLootLockerMetadataEntry with a Base64 Value.
|
static |
Factory method that makes an FLootLockerMetadataEntry with a Bool Value.
|
static |
|
static |
Factory method that makes an FLootLockerMetadataEntry with a Float Value.
|
static |
Factory method that makes an FLootLockerMetadataEntry with an Integer Value.
|
static |
Factory method that makes an FLootLockerMetadataEntry with a JsonArray Value.
|
static |
Factory method that makes an FLootLockerMetadataEntry with a JsonObject Value.
|
static |
Factory method that makes an FLootLockerMetadataEntry with a JsonValue Value.
|
static |
Factory method that makes an FLootLockerMetadataEntry with a String Value.
| void FLootLockerMetadataEntry::SetRawValue | ( | const TSharedPtr< FJsonValue > & | Value | ) |
Set the value as a JsonValue.
| void FLootLockerMetadataEntry::SetValueAsBase64 | ( | const FLootLockerMetadataBase64Value & | Value | ) |
Set the value as a Base64 object.
| void FLootLockerMetadataEntry::SetValueAsBool | ( | const bool & | Value | ) |
Set the value as a bool.
| void FLootLockerMetadataEntry::SetValueAsFloat | ( | const float & | Value | ) |
Set the value as a float.
| void FLootLockerMetadataEntry::SetValueAsInteger | ( | const int & | Value | ) |
Set the value as an integer.
| void FLootLockerMetadataEntry::SetValueAsJsonArray | ( | const TArray< TSharedPtr< FJsonValue > > & | Value | ) |
Set the value as a Json Array.
| void FLootLockerMetadataEntry::SetValueAsJsonObject | ( | const FJsonObject & | Value | ) |
Set the value as a Json Object.
| void FLootLockerMetadataEntry::SetValueAsString | ( | const FString & | Value | ) |
Set the value as a String.
| bool FLootLockerMetadataEntry::SetValueAsUStruct | ( | const T & | Value | ) |
Set the value as the provided UStruct object.
Returns true if value could be serialized.
| bool FLootLockerMetadataEntry::TryGetRawValue | ( | TSharedPtr< FJsonValue > & | Output | ) | const |
Get the value as an unparsed json value.
Returns true if value could be found in which case Output contains the JsonValue, returns false if the value field was not present.
| bool FLootLockerMetadataEntry::TryGetSerializedValue | ( | FString & | Output | ) | const |
Get the value in a json string format.
Returns true if the value was present and could be serialized, returns false otherwise
| bool FLootLockerMetadataEntry::TryGetValueAsBase64 | ( | FLootLockerMetadataBase64Value & | Output | ) | const |
Get the value as a LootLockerMetadataBase64Value object.
Returns true if value could be parsed in which case Output contains the FLootLockerMetadataBase64Value, returns false if parsing failed.
| bool FLootLockerMetadataEntry::TryGetValueAsBool | ( | bool & | Output | ) | const |
Get the value as a boolean.
Returns true if value could be parsed in which case Output contains the bool, returns false if parsing failed which can happen if the string is not a convertible to a boolean (those are for example "0", "1", "true", "False", "yes", "NO", etc).
| bool FLootLockerMetadataEntry::TryGetValueAsFloat | ( | float & | Output | ) | const |
Get the value as a float.
Returns true if value could be parsed in which case Output contains the float, returns false if parsing failed which can happen if the value is not numeric, the conversion under or overflows, or the string value precision is larger than can be dealt within a float.
| bool FLootLockerMetadataEntry::TryGetValueAsInteger | ( | int & | Output | ) | const |
Get the value as an integer.
TReturns true if value could be parsed in which case Output contains the int, returns false if parsing failed which can happen if
| bool FLootLockerMetadataEntry::TryGetValueAsJsonArray | ( | TArray< TSharedPtr< FJsonValue > > & | Output | ) | const |
Get the value as a Json Array.
Returns true if value could be parsed in which case Output contains the Json Array, returns false if parsing failed which can happen if the value is not a valid json array string
| bool FLootLockerMetadataEntry::TryGetValueAsJsonObject | ( | TSharedPtr< FJsonObject > & | Output | ) | const |
Get the value as a Json Object.
Returns true if value could be parsed in which case Output contains the Json Object, returns false if parsing failed which can happen if the value is not a valid json object string.
| bool FLootLockerMetadataEntry::TryGetValueAsString | ( | FString & | Output | ) | const |
Get the value as a String.
Returns true if value could be parsed in which case Output contains the string value untouched, returns false if parsing failed.
| TArray<FString> FLootLockerMetadataEntry::Access |
The access level set for this metadata entry.
Valid values are game_api.read, game_api.write and player.read (only applicable for player metadata and means that the metadata entry is readable for all players, not only for the owner), though no values are required. Note that different sources can allow or disallow a subset of these values.
| FString FLootLockerMetadataEntry::Key = "" |
The metadata key.
| TArray<FString> FLootLockerMetadataEntry::Tags |
List of tags applied to this metadata.
| ELootLockerMetadataTypes FLootLockerMetadataEntry::Type = ELootLockerMetadataTypes::String |
The type of value this metadata contains.
Use this to parse the value.