LootLocker Unreal SDK 10.4.0
Game backend SDK for Unreal Engine
Loading...
Searching...
No Matches
FLootLockerMetadataEntry Struct Reference

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.
 

Detailed Description

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.

Member Function Documentation

◆ _INTERNAL_SetJsonRepresentation()

void FLootLockerMetadataEntry::_INTERNAL_SetJsonRepresentation ( const FJsonObject &  obj)

◆ MakeBase64Entry()

static FLootLockerMetadataEntry FLootLockerMetadataEntry::MakeBase64Entry ( const FString &  Key,
const TArray< FString > &  Tags,
const TArray< FString > &  Access,
const FLootLockerMetadataBase64Value Value 
)
static

Factory method that makes an FLootLockerMetadataEntry with a Base64 Value.

◆ MakeBoolEntry()

static FLootLockerMetadataEntry FLootLockerMetadataEntry::MakeBoolEntry ( const FString &  Key,
const TArray< FString > &  Tags,
const TArray< FString > &  Access,
const bool  Value 
)
static

Factory method that makes an FLootLockerMetadataEntry with a Bool Value.

◆ MakeEntryExceptValue()

static FLootLockerMetadataEntry FLootLockerMetadataEntry::MakeEntryExceptValue ( const FString &  Key,
const TArray< FString > &  Tags,
const TArray< FString > &  Access,
const ELootLockerMetadataTypes  Type 
)
static

◆ MakeFloatEntry()

static FLootLockerMetadataEntry FLootLockerMetadataEntry::MakeFloatEntry ( const FString &  Key,
const TArray< FString > &  Tags,
const TArray< FString > &  Access,
const float &  Value 
)
static

Factory method that makes an FLootLockerMetadataEntry with a Float Value.

◆ MakeIntegerEntry()

static FLootLockerMetadataEntry FLootLockerMetadataEntry::MakeIntegerEntry ( const FString &  Key,
const TArray< FString > &  Tags,
const TArray< FString > &  Access,
const int  Value 
)
static

Factory method that makes an FLootLockerMetadataEntry with an Integer Value.

◆ MakeJsonArrayEntry()

static FLootLockerMetadataEntry FLootLockerMetadataEntry::MakeJsonArrayEntry ( const FString &  Key,
const TArray< FString > &  Tags,
const TArray< FString > &  Access,
const TArray< TSharedPtr< FJsonValue > > &  Value 
)
static

Factory method that makes an FLootLockerMetadataEntry with a JsonArray Value.

◆ MakeJsonObjectEntry()

static FLootLockerMetadataEntry FLootLockerMetadataEntry::MakeJsonObjectEntry ( const FString &  Key,
const TArray< FString > &  Tags,
const TArray< FString > &  Access,
const FJsonObject &  Value 
)
static

Factory method that makes an FLootLockerMetadataEntry with a JsonObject Value.

◆ MakeJsonValueEntry()

static FLootLockerMetadataEntry FLootLockerMetadataEntry::MakeJsonValueEntry ( const FString &  Key,
const TArray< FString > &  Tags,
const TArray< FString > &  Access,
const ELootLockerMetadataTypes  Type,
const TSharedPtr< FJsonValue >  Value 
)
static

Factory method that makes an FLootLockerMetadataEntry with a JsonValue Value.

◆ MakeStringEntry()

static FLootLockerMetadataEntry FLootLockerMetadataEntry::MakeStringEntry ( const FString &  Key,
const TArray< FString > &  Tags,
const TArray< FString > &  Access,
const FString &  Value 
)
static

Factory method that makes an FLootLockerMetadataEntry with a String Value.

◆ SetRawValue()

void FLootLockerMetadataEntry::SetRawValue ( const TSharedPtr< FJsonValue > &  Value)

Set the value as a JsonValue.

◆ SetValueAsBase64()

void FLootLockerMetadataEntry::SetValueAsBase64 ( const FLootLockerMetadataBase64Value Value)

Set the value as a Base64 object.

◆ SetValueAsBool()

void FLootLockerMetadataEntry::SetValueAsBool ( const bool &  Value)

Set the value as a bool.

◆ SetValueAsFloat()

void FLootLockerMetadataEntry::SetValueAsFloat ( const float &  Value)

Set the value as a float.

◆ SetValueAsInteger()

void FLootLockerMetadataEntry::SetValueAsInteger ( const int &  Value)

Set the value as an integer.

◆ SetValueAsJsonArray()

void FLootLockerMetadataEntry::SetValueAsJsonArray ( const TArray< TSharedPtr< FJsonValue > > &  Value)

Set the value as a Json Array.

◆ SetValueAsJsonObject()

void FLootLockerMetadataEntry::SetValueAsJsonObject ( const FJsonObject &  Value)

Set the value as a Json Object.

◆ SetValueAsString()

void FLootLockerMetadataEntry::SetValueAsString ( const FString &  Value)

Set the value as a String.

◆ SetValueAsUStruct()

template<typename T >
bool FLootLockerMetadataEntry::SetValueAsUStruct ( const T &  Value)

Set the value as the provided UStruct object.

Returns true if value could be serialized.

◆ TryGetRawValue()

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.

◆ TryGetSerializedValue()

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

◆ TryGetValueAsBase64()

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.

◆ TryGetValueAsBool()

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).

◆ TryGetValueAsFloat()

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.

◆ TryGetValueAsInteger()

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

◆ TryGetValueAsJsonArray()

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

◆ TryGetValueAsJsonObject()

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.

◆ TryGetValueAsString()

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.

Field Documentation

◆ Access

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.

◆ Key

FString FLootLockerMetadataEntry::Key = ""

The metadata key.

◆ Tags

TArray<FString> FLootLockerMetadataEntry::Tags

List of tags applied to this metadata.

◆ Type

The type of value this metadata contains.

Use this to parse the value.