#include <MetricsAttribute.h>
|
| 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
◆ GetSizeInBytes()
size_t AWSMetrics::MetricsAttribute::GetSizeInBytes |
( |
| ) |
const |
Get the metrics attribute size serialized to json.
- Returns
- metrics attribute size in bytes.
◆ IsDefault()
bool AWSMetrics::MetricsAttribute::IsDefault |
( |
| ) |
const |
Check whether the attribute is one of the default attributes.
- Returns
- Whether the attribute is a default one.
◆ ReadFromJson()
bool AWSMetrics::MetricsAttribute::ReadFromJson |
( |
const rapidjson::Value & |
name, |
|
|
const rapidjson::Value & |
val |
|
) |
| |
Read from a JSON value to the metrics attribute.
- Parameters
-
name | JSON value used for the attribute name. |
name | JSON value used for the attribute value. |
- Returns
- Whether the metrics attribute is created successfully
◆ SerializeToJson()
bool AWSMetrics::MetricsAttribute::SerializeToJson |
( |
AWSCore::JsonWriter & |
writer | ) |
const |
Serialize the metrics attribute to JSON for sending requests.
- Parameters
-
writer | JSON writer for the serialization. |
- Returns
- Whether the metrics attribute is serialized successfully.
The documentation for this class was generated from the following file:
- Gems/AWSMetrics/Code/Include/MetricsAttribute.h