#ifndef COMPONENTS_ATTRIBUTION_REPORTING_EVENT_TRIGGER_DATA_H_
#define COMPONENTS_ATTRIBUTION_REPORTING_EVENT_TRIGGER_DATA_H_
#include <stdint.h>
#include <optional>
#include "base/component_export.h"
#include "base/types/expected.h"
#include "components/attribution_reporting/filters.h"
#include "components/attribution_reporting/trigger_registration_error.mojom-forward.h"
namespace base {
class DictValue;
class Value;
}
namespace attribution_reporting {
struct COMPONENT_EXPORT(ATTRIBUTION_REPORTING) EventTriggerData {
static base::expected<EventTriggerData, mojom::TriggerRegistrationError>
FromJSON(base::Value& value);
uint64_t data = 0;
int64_t priority = 0;
std::optional<uint64_t> dedup_key;
FilterPair filters;
EventTriggerData();
EventTriggerData(uint64_t data,
int64_t priority,
std::optional<uint64_t> dedup_key,
FilterPair);
base::DictValue ToJson() const;
friend bool operator==(const EventTriggerData&,
const EventTriggerData&) = default;
};
}
#endif