Skip to content

Commit

Permalink
updated from discussion with Origin - campaign group name, grouping d…
Browse files Browse the repository at this point in the history
…imensions, event group summaries
  • Loading branch information
kungfucraig committed Jan 16, 2025
1 parent bf87871 commit bacc9ce
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 53 deletions.
17 changes: 16 additions & 1 deletion src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ proto_library(
srcs = ["event_filter.proto"],
strip_import_prefix = IMPORT_PREFIX,
deps = [
":event_template_field_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
],
)
Expand All @@ -62,6 +63,20 @@ kt_jvm_proto_library(
deps = [":event_group_proto"],
)

proto_library(
name = "event_template_field_proto",
srcs = ["event_template_field.proto"],
strip_import_prefix = IMPORT_PREFIX,
deps = [
"@com_google_googleapis//google/api:field_behavior_proto",
],
)

kt_jvm_proto_library(
name = "event_template_field_kt_jvm_proto",
deps = [":event_template_field_proto"],
)

proto_library(
name = "impression_qualification_filter_proto",
srcs = ["impression_qualification_filter.proto"],
Expand All @@ -86,7 +101,6 @@ proto_library(
":event_filter_proto",
":media_type_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_protobuf//:duration_proto",
],
)

Expand Down Expand Up @@ -293,6 +307,7 @@ proto_library(
strip_import_prefix = IMPORT_PREFIX,
deps = [
":event_filter_proto",
":event_template_field_proto",
":metric_frequency_spec_proto",
":reporting_impression_qualification_filter_proto",
":reporting_unit_proto",
Expand Down
33 changes: 21 additions & 12 deletions src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,25 @@ message BasicReport {
// Human readable title of the report.
string title = 2 [(google.api.field_behavior) = IMMUTABLE];

// This is the resource name of a primitive ReportingSet that includes all of
// the EventGroups that may be reported on.
//
// EventGroups may span DataProviders and MediaTypes.
string campaign_group = 3 [
(google.api.resource_reference) = {
type: "reporting.halo-cmm.org/ReportingSet"
},
(google.api.field_behavior) = IMMUTABLE
];
message CampaignGroup {
// This is the resource name of a primitive ReportingSet that includes all
// of the EventGroups that may be reported on.
//
// EventGroups may span DataProviders and MediaTypes.
string reporting_set = 1 [
(google.api.resource_reference) = {
type: "reporting.halo-cmm.org/ReportingSet"
},
(google.api.field_behavior) = IMMUTABLE
];

string display_name = 2 [
(google.api.field_behavior) = IMMUTABLE,
(google.api.field_behavior) = OUTPUT_ONLY
];
}
// The campaign group to report on
CampaignGroup campaign_group = 3 [(google.api.field_behavior) = IMMUTABLE];

// The interval of time that the BasicReport spans
//
Expand All @@ -73,8 +82,8 @@ message BasicReport {

// The report results
repeated Page pages = 6 [
(google.api.field_behavior) = IMMUTABLE,
(google.api.field_behavior) = OUTPUT_ONLY
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.field_behavior) = IMMUTABLE
];

// The time when the BasicReport was created.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,50 +17,18 @@ syntax = "proto3";
package wfa.measurement.reporting.v2alpha;

import "google/api/field_behavior.proto";
import "wfa/measurement/reporting/v2alpha/event_template_field.proto";

option java_package = "org.wfanet.measurement.reporting.v2alpha";
option java_multiple_files = true;
option java_outer_classname = "EventFilterProto";

// Event filter criteria
message EventFilter {
// A term in the Filter expression
message Term {
// A field path indicating a dimension to filter on.
//
// Each field path is with respect to the local market Event message
// with `.` as the traversal operator.
//
// For example, if the Event message had an event template `common` with
// a field `age_group` then the field path would be `common.age_group`.
string event_template_field = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = IMMUTABLE
];
// The value of the event template field to filter
message FieldValue {
// Value type selector. Required.
oneof selector {
// The field value as a string
string string_value = 1 [(google.api.field_behavior) = IMMUTABLE];
// The field value as a stringified enum value. This is the symbol
// associated with the enum value, not a stringification of its integer
// value. For example, for MediaType.VIDEO we expect "VIDEO" not "1"
string enum_value = 2 [(google.api.field_behavior) = IMMUTABLE];
// The field value as a Boolean
bool bool_value = 3 [(google.api.field_behavior) = IMMUTABLE];
}
}
// The value of the event_template_field to filter
FieldValue value = 2 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = IMMUTABLE
];
}
// A disjunction of terms that define the filter criteria.
//
// A current limitation is that the number of terms must be exactly one.
repeated Term terms = 1 [
repeated EventTemplateField terms = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = IMMUTABLE
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ syntax = "proto3";
package wfa.measurement.reporting.v2alpha;

import "google/api/field_behavior.proto";
import "google/protobuf/duration.proto";
import "wfa/measurement/reporting/v2alpha/event_filter.proto";
import "wfa/measurement/reporting/v2alpha/media_type.proto";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ option java_outer_classname = "MediaTypeProto";
enum MediaType {
// Default value. Unused.
MEDIA_TYPE_UNSPECIFIED = 0;
// Interpret a set of arifacts as Video
// Interpret a set of artifacts as Video
VIDEO = 1;
// Interpret a set of arifacts as Display
// Interpret a set of artifacts as Display
DISPLAY = 2;
// Interpret as set of artifacts as Other
OTHER = 3;
Expand Down
31 changes: 28 additions & 3 deletions src/main/proto/wfa/measurement/reporting/v2alpha/page.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/type/interval.proto";
import "wfa/measurement/reporting/v2alpha/event_filter.proto";
import "wfa/measurement/reporting/v2alpha/event_template_field.proto";
import "wfa/measurement/reporting/v2alpha/metric_frequency_spec.proto";
import "wfa/measurement/reporting/v2alpha/reporting_impression_qualification_filter.proto";
import "wfa/measurement/reporting/v2alpha/reporting_unit.proto";
Expand Down Expand Up @@ -88,7 +89,6 @@ message Page {
// The metric metadata
message MetricMetadata {
// A summary of a component of the reporting_unit being reported on
// TODO(@kungfucraig): Phase II - Add support for Event Group summaries.
message ReportingUnitComponentSummary {
// The resource name of a component of the reporting_unit
//
Expand All @@ -102,6 +102,23 @@ message Page {

// Display name of the component
string display_name = 2 [(google.api.field_behavior) = IMMUTABLE];

// Summary of an EventGroup entailed by the component
// TODO(@kungfucraig): Add EventGroup metadata once it has been
// formally encoded in the EventGroup.
message EventGroupSummary {
// The resource name of an EventGroup
string event_group = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = IMMUTABLE,
(google.api.resource_reference) = {
type: "halo.wfanet.org/EventGroup"
}
];
}
// A summary of each EventGroup entailed by the component.
repeated EventGroupSummary event_group_summaries = 3
[(google.api.field_behavior) = IMMUTABLE];
}

// A summary of each component of the reporting_unit reported on
Expand All @@ -121,8 +138,16 @@ message Page {
// The windowing spec that was applied
WindowingSpec windowing_spec = 3 [(google.api.field_behavior) = IMMUTABLE];

// The dimension spec that was applied
DimensionSpec dimension_spec = 4 [(google.api.field_behavior) = IMMUTABLE];
// A summary of the aspects of the DimensionSpec that were applied
message DimensionSpecSummary {
// The grouping dimensions and values for the reported metrics
EventTemplateField grouping = 1 [(google.api.field_behavior) = IMMUTABLE];
// The filters applied to the reported metrics
repeated EventFilter filters = 2
[(google.api.field_behavior) = IMMUTABLE];
}
DimensionSpecSummary dimension_spec_summary = 4
[(google.api.field_behavior) = IMMUTABLE];

// The impression qualification filter that was applied
ReportingImpressionQualificationFilter filter = 5
Expand Down

0 comments on commit bacc9ce

Please sign in to comment.