// AUTOGENERATED BY glean_parser. DO NOT EDIT.
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
#ifndef mozilla_GleanSatchelMetrics_h
#define mozilla_GleanSatchelMetrics_h
#include "mozilla/glean/bindings/MetricTypes.h"
namespace mozilla::glean {
namespace autocomplete {
/**
* generated from autocomplete.dropdown_closed
*/
struct DropdownClosedExtra {
mozilla::Maybe<nsCString> closeReason;
mozilla::Maybe<nsCString> flowId;
mozilla::Maybe<nsCString> recordType;
std::tuple<nsTArray<nsCString>, nsTArray<nsCString>> ToFfiExtra() const {
nsTArray<nsCString> extraKeys;
nsTArray<nsCString> extraValues;
if (closeReason) {
extraKeys.AppendElement()->AssignASCII("close_reason");
extraValues.EmplaceBack(closeReason.value());
}
if (flowId) {
extraKeys.AppendElement()->AssignASCII("flow_id");
extraValues.EmplaceBack(flowId.value());
}
if (recordType) {
extraKeys.AppendElement()->AssignASCII("record_type");
extraValues.EmplaceBack(recordType.value());
}
return std::make_tuple(std::move(extraKeys), std::move(extraValues));
}
};
/**
* Recorded when the autocomplete dropdown closes.
*/
constexpr impl::EventMetric<DropdownClosedExtra> dropdown_closed(6438);
/**
* generated from autocomplete.dropdown_shown
*/
struct DropdownShownExtra {
mozilla::Maybe<nsCString> flowId;
mozilla::Maybe<nsCString> recordType;
mozilla::Maybe<bool> reopenedAfterRemoval;
std::tuple<nsTArray<nsCString>, nsTArray<nsCString>> ToFfiExtra() const {
nsTArray<nsCString> extraKeys;
nsTArray<nsCString> extraValues;
if (flowId) {
extraKeys.AppendElement()->AssignASCII("flow_id");
extraValues.EmplaceBack(flowId.value());
}
if (recordType) {
extraKeys.AppendElement()->AssignASCII("record_type");
extraValues.EmplaceBack(recordType.value());
}
if (reopenedAfterRemoval) {
extraKeys.AppendElement()->AssignASCII("reopened_after_removal");
extraValues.AppendElement()->AssignASCII(reopenedAfterRemoval.value() ? "true" : "false");
}
return std::make_tuple(std::move(extraKeys), std::move(extraValues));
}
};
/**
* Recorded when the autocomplete dropdown opens on a field.
*/
constexpr impl::EventMetric<DropdownShownExtra> dropdown_shown(6439);
/**
* generated from autocomplete.record_dialog_interaction
*/
struct RecordDialogInteractionExtra {
mozilla::Maybe<nsCString> flowId;
mozilla::Maybe<nsCString> interactionType;
mozilla::Maybe<nsCString> recordType;
mozilla::Maybe<nsCString> updateType;
std::tuple<nsTArray<nsCString>, nsTArray<nsCString>> ToFfiExtra() const {
nsTArray<nsCString> extraKeys;
nsTArray<nsCString> extraValues;
if (flowId) {
extraKeys.AppendElement()->AssignASCII("flow_id");
extraValues.EmplaceBack(flowId.value());
}
if (interactionType) {
extraKeys.AppendElement()->AssignASCII("interaction_type");
extraValues.EmplaceBack(interactionType.value());
}
if (recordType) {
extraKeys.AppendElement()->AssignASCII("record_type");
extraValues.EmplaceBack(recordType.value());
}
if (updateType) {
extraKeys.AppendElement()->AssignASCII("update_type");
extraValues.EmplaceBack(updateType.value());
}
return std::make_tuple(std::move(extraKeys), std::move(extraValues));
}
};
/**
* Recorded when the user responds to the confirmation dialog shown before a saved record is removed from the autocomplete dropdown. Intended to capture whether or not the user confirms the removal.
*/
constexpr impl::EventMetric<RecordDialogInteractionExtra> record_dialog_interaction(6440);
/**
* generated from autocomplete.record_interaction
*/
struct RecordInteractionExtra {
mozilla::Maybe<nsCString> flowId;
mozilla::Maybe<nsCString> interactionType;
mozilla::Maybe<nsCString> recordType;
std::tuple<nsTArray<nsCString>, nsTArray<nsCString>> ToFfiExtra() const {
nsTArray<nsCString> extraKeys;
nsTArray<nsCString> extraValues;
if (flowId) {
extraKeys.AppendElement()->AssignASCII("flow_id");
extraValues.EmplaceBack(flowId.value());
}
if (interactionType) {
extraKeys.AppendElement()->AssignASCII("interaction_type");
extraValues.EmplaceBack(interactionType.value());
}
if (recordType) {
extraKeys.AppendElement()->AssignASCII("record_type");
extraValues.EmplaceBack(recordType.value());
}
return std::make_tuple(std::move(extraKeys), std::move(extraValues));
}
};
/**
* Recorded when the user clicks or activates the secondary action of a saved record in the autocomplete dropdown.
*/
constexpr impl::EventMetric<RecordInteractionExtra> record_interaction(6441);
}
} // namespace mozilla::glean
#endif // mozilla_GleanSatchelMetrics_h