Open 3D Engine AWSMetrics Gem API Reference
24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
#include <MetricsAttribute.h>
Public Member Functions | |
MetricsAttribute (const AZStd::string &name, int intVal) | |
MetricsAttribute (const AZStd::string &name, double doubleVal) | |
MetricsAttribute (const AZStd::string &name, const AZStd::string &strVal) | |
void | SetName (const AZStd::string &name) |
AZStd::string | GetName () const |
void | SetVal (const AZStd::string &val) |
void | SetVal (int val) |
void | SetVal (double val) |
AZStd::variant< int, double, AZStd::string > | GetVal () const |
size_t | GetSizeInBytes () const |
bool | IsDefault () const |
bool | SerializeToJson (AWSCore::JsonWriter &writer) const |
bool | ReadFromJson (const rapidjson::Value &name, const rapidjson::Value &val) |
MetricsAttribute represents one attribute of the metrics. Attribute value can be int, double or string. e.g. name: event_name, value: login
size_t AWSMetrics::MetricsAttribute::GetSizeInBytes | ( | ) | const |
Get the metrics attribute size serialized to json.
bool AWSMetrics::MetricsAttribute::IsDefault | ( | ) | const |
Check whether the attribute is one of the default attributes.
bool AWSMetrics::MetricsAttribute::ReadFromJson | ( | const rapidjson::Value & | name, |
const rapidjson::Value & | val | ||
) |
Read from a JSON value to the metrics attribute.
name | JSON value used for the attribute name. |
name | JSON value used for the attribute value. |
bool AWSMetrics::MetricsAttribute::SerializeToJson | ( | AWSCore::JsonWriter & | writer | ) | const |
Serialize the metrics attribute to JSON for sending requests.
writer | JSON writer for the serialization. |