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

Holds the content of a notification, including context key-value pairs, body type hint, and helper methods for parsing the body into typed values or reward objects. More...

#include <LootLockerNotificationsRequestHandler.h>

Public Member Functions

bool TryGetContentBodyAsString (FString &Output) const
 Get the body as a String.
 
bool TryGetContentBodyAsFloat (float &Output) const
 Get the body as a float.
 
bool TryGetContentBodyAsInteger (int &Output) const
 Get the body as an integer.
 
bool TryGetContentBodyAsBool (bool &Output) const
 Get the body as a boolean.
 
bool TryGetContentBodyAsStringArray (TArray< FString > &Output) const
 Get the body as a String.
 
bool TryGetContentBodyAsFloatArray (TArray< float > &Output) const
 Get the body as a float.
 
bool TryGetContentBodyAsIntegerArray (TArray< int > &Output) const
 Get the body as an integer.
 
bool TryGetContentBodyAsBoolArray (TArray< bool > &Output) const
 Get the body as a boolean.
 
bool TryGetRawValue (TSharedPtr< FJsonValue > &Output) const
 Get the body as an unparsed json body.
 
bool TryGetContentBodyAsJsonObject (TSharedPtr< FJsonObject > &Output) const
 Get the body as a Json Object.
 
bool TryGetContentBodyAsJsonArray (TArray< TSharedPtr< FJsonValue > > &Output) const
 Get the body as a Json Array.
 
bool TryGetContentBodyAsRewardNotification (FLootLockerNotificationContentRewardBody &Output) const
 Get the body as a LootLockerNotificationContentBody object.
 

Data Fields

TArray< FLootLockerNotificationContextEntryContext
 The context for this content.
 
TMap< FString, FString > ContextAsDictionary
 The context for this content.
 
FString IdentifyingContextKey = ""
 The key from the context that will most likely help in identifying this notification.
 
ELootLockerNotificationContentBodyType BodyType = ELootLockerNotificationContentBodyType::unknown
 The interpreted type of the content body.
 
FString BodyAsJsonString = ""
 The body for this notification content as a json string, use the dedicated methods to parse this.
 
TSharedPtr< FJsonValue > BodyAsJsonValue
 The body for this notification content as a json value, use the dedicated methods to parse this.
 

Detailed Description

Holds the content of a notification, including context key-value pairs, body type hint, and helper methods for parsing the body into typed values or reward objects.

Member Function Documentation

◆ TryGetContentBodyAsBool()

bool FLootLockerNotificationContent::TryGetContentBodyAsBool ( bool &  Output) const

Get the body as a boolean.

Returns true if body 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).

◆ TryGetContentBodyAsBoolArray()

bool FLootLockerNotificationContent::TryGetContentBodyAsBoolArray ( TArray< bool > &  Output) const

Get the body as a boolean.

Returns true if body 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).

◆ TryGetContentBodyAsFloat()

bool FLootLockerNotificationContent::TryGetContentBodyAsFloat ( float &  Output) const

Get the body as a float.

Returns true if body could be parsed in which case Output contains the float, returns false if parsing failed which can happen if the body is not numeric, the conversion under or overflows, or the string body precision is larger than can be dealt within a float.

◆ TryGetContentBodyAsFloatArray()

bool FLootLockerNotificationContent::TryGetContentBodyAsFloatArray ( TArray< float > &  Output) const

Get the body as a float.

Returns true if body could be parsed in which case Output contains the float, returns false if parsing failed which can happen if the body is not numeric, the conversion under or overflows, or the string body precision is larger than can be dealt within a float.

◆ TryGetContentBodyAsInteger()

bool FLootLockerNotificationContent::TryGetContentBodyAsInteger ( int &  Output) const

Get the body as an integer.

TReturns true if body could be parsed in which case Output contains the int, returns false if parsing failed which can happen if

◆ TryGetContentBodyAsIntegerArray()

bool FLootLockerNotificationContent::TryGetContentBodyAsIntegerArray ( TArray< int > &  Output) const

Get the body as an integer.

TReturns true if body could be parsed in which case Output contains the int, returns false if parsing failed which can happen if

◆ TryGetContentBodyAsJsonArray()

bool FLootLockerNotificationContent::TryGetContentBodyAsJsonArray ( TArray< TSharedPtr< FJsonValue > > &  Output) const

Get the body as a Json Array.

Returns true if body could be parsed in which case Output contains the Json Array, returns false if parsing failed which can happen if the body is not a valid json array string

◆ TryGetContentBodyAsJsonObject()

bool FLootLockerNotificationContent::TryGetContentBodyAsJsonObject ( TSharedPtr< FJsonObject > &  Output) const

Get the body as a Json Object.

Returns true if body could be parsed in which case Output contains the Json Object, returns false if parsing failed which can happen if the body is not a valid json object string.

◆ TryGetContentBodyAsRewardNotification()

bool FLootLockerNotificationContent::TryGetContentBodyAsRewardNotification ( FLootLockerNotificationContentRewardBody Output) const

Get the body as a LootLockerNotificationContentBody object.

Returns true if body could be parsed in which case Output contains the FLootLockerMetadataBase64Value, returns false if parsing failed.

◆ TryGetContentBodyAsString()

bool FLootLockerNotificationContent::TryGetContentBodyAsString ( FString &  Output) const

Get the body as a String.

Returns true if body could be parsed in which case Output contains the string body untouched, returns false if parsing failed.

◆ TryGetContentBodyAsStringArray()

bool FLootLockerNotificationContent::TryGetContentBodyAsStringArray ( TArray< FString > &  Output) const

Get the body as a String.

Returns true if body could be parsed in which case Output contains the string body untouched, returns false if parsing failed.

◆ TryGetRawValue()

bool FLootLockerNotificationContent::TryGetRawValue ( TSharedPtr< FJsonValue > &  Output) const

Get the body as an unparsed json body.

Returns true if body could be found in which case Output contains the JsonValue, returns false if the body field was not present.

Field Documentation

◆ BodyAsJsonString

FString FLootLockerNotificationContent::BodyAsJsonString = ""

The body for this notification content as a json string, use the dedicated methods to parse this.

◆ BodyAsJsonValue

TSharedPtr<FJsonValue> FLootLockerNotificationContent::BodyAsJsonValue

The body for this notification content as a json value, use the dedicated methods to parse this.

◆ BodyType

The interpreted type of the content body.

Use this as a hint on how to parse the body.

◆ Context

TArray<FLootLockerNotificationContextEntry> FLootLockerNotificationContent::Context

The context for this content.

This is a set of key value pairs that hold additional context information about this notification.

◆ ContextAsDictionary

TMap<FString, FString> FLootLockerNotificationContent::ContextAsDictionary

The context for this content.

This is a set of key value pairs that hold additional context information about this notification.

◆ IdentifyingContextKey

FString FLootLockerNotificationContent::IdentifyingContextKey = ""

The key from the context that will most likely help in identifying this notification.