Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Basic Report #1942

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
9bb0ebe
feat: Adds the definition of basic report.
kungfucraig Dec 1, 2024
ca15e7e
format build file
kungfucraig Dec 2, 2024
73ccd02
updates
kungfucraig Dec 4, 2024
413b2f2
substantial changes
kungfucraig Dec 15, 2024
2050287
build update
kungfucraig Dec 15, 2024
3204df4
update from review
kungfucraig Dec 15, 2024
5058836
Api lint
kungfucraig Dec 16, 2024
bd489be
format + made reporting media types plural
kungfucraig Dec 16, 2024
3b30d82
remove advacned report
kungfucraig Dec 16, 2024
dd9b3d4
Addeed basic reports service definition.
kungfucraig Dec 17, 2024
6a626f5
updated from review
kungfucraig Dec 17, 2024
37303f2
Updates from review
kungfucraig Dec 17, 2024
a9fa095
updated from reviews
kungfucraig Dec 17, 2024
d225a8b
added impression qualification server, lint errors, review comments
kungfucraig Dec 18, 2024
7c51263
update comments
kungfucraig Dec 18, 2024
56154a5
Add a todo to figure out stacked report by channel
kungfucraig Dec 18, 2024
388ddb4
revert formatting
kungfucraig Dec 18, 2024
4b67ec3
revert formatting
kungfucraig Dec 18, 2024
a42584d
review updates
kungfucraig Dec 18, 2024
8de574d
updates
kungfucraig Dec 18, 2024
3f31b0b
update
kungfucraig Dec 18, 2024
97a8c52
added stacked reach description
kungfucraig Dec 18, 2024
c49eb6b
update list method annotation
kungfucraig Dec 19, 2024
89bf0ea
update from advanced report work
kungfucraig Jan 2, 2025
5fc833b
remove new build tagets
kungfucraig Jan 2, 2025
fda8305
reviewed my code
kungfucraig Jan 2, 2025
ba01a4c
more from my review
kungfucraig Jan 2, 2025
036b9bb
more review
kungfucraig Jan 2, 2025
463a950
instantiate page metric result
kungfucraig Jan 2, 2025
3832eb9
updated from review
kungfucraig Jan 3, 2025
2ed3366
page update
kungfucraig Jan 3, 2025
89712f7
updates
kungfucraig Jan 3, 2025
3dcf862
remove stray text
kungfucraig Jan 3, 2025
4453cbb
removed Phase III items and updated some comments
kungfucraig Jan 3, 2025
bf52d95
remove stray comment:
kungfucraig Jan 3, 2025
c53dbbc
deleted frequency histogram
kungfucraig Jan 3, 2025
571120f
update dcomment
kungfucraig Jan 3, 2025
39ce2c3
update some comments
kungfucraig Jan 3, 2025
13ccb7e
feat: Add MC API Phase I protos
kungfucraig Jan 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
188 changes: 188 additions & 0 deletions src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,26 @@ IMPORT_PREFIX = "/src/main/proto"

# Resources and shared message types.

proto_library(
name = "basic_report_proto",
srcs = ["basic_report.proto"],
strip_import_prefix = IMPORT_PREFIX,
deps = [
":media_type_proto",
":page_proto",
":reporting_impression_qualification_filter_proto",
":reporting_interval_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
"@com_google_protobuf//:timestamp_proto",
],
)

kt_jvm_proto_library(
name = "basic_report_kt_jvm_proto",
deps = [":basic_report_proto"],
)

proto_library(
name = "event_group_proto",
srcs = ["event_group.proto"],
Expand All @@ -29,6 +49,51 @@ kt_jvm_proto_library(
deps = [":event_group_proto"],
)

proto_library(
name = "impression_qualification_filter_proto",
srcs = ["impression_qualification_filter.proto"],
strip_import_prefix = IMPORT_PREFIX,
deps = [
":impression_qualification_filter_spec_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
],
)

kt_jvm_proto_library(
name = "impression_qualification_filter_kt_jvm_proto",
deps = [":impression_qualification_filter_proto"],
)

proto_library(
name = "impression_qualification_filter_spec_proto",
srcs = ["impression_qualification_filter_spec.proto"],
strip_import_prefix = IMPORT_PREFIX,
deps = [
":media_type_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_protobuf//:duration_proto",
],
)

kt_jvm_proto_library(
name = "impression_qualification_filter_spec_kt_jvm_proto",
deps = [":impression_qualification_filter_spec_proto"],
)

proto_library(
name = "media_type_proto",
srcs = ["media_type.proto"],
strip_import_prefix = IMPORT_PREFIX,
deps = [
],
)

kt_jvm_proto_library(
name = "media_type_kt_jvm_proto",
deps = [":media_type_proto"],
)

proto_library(
name = "metric_proto",
srcs = ["metric.proto"],
Expand Down Expand Up @@ -64,6 +129,21 @@ kt_jvm_proto_library(
deps = [":metric_calculation_spec_proto"],
)

proto_library(
name = "metric_frequency_spec_proto",
srcs = ["metric_frequency_spec.proto"],
strip_import_prefix = IMPORT_PREFIX,
deps = [
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/type:dayofweek_proto",
],
)

kt_jvm_proto_library(
name = "metric_frequency_spec_kt_jvm_proto",
deps = [":metric_frequency_spec_proto"],
)

proto_library(
name = "report_proto",
srcs = ["report.proto"],
Expand Down Expand Up @@ -121,6 +201,54 @@ kt_jvm_proto_library(
deps = [":report_schedule_iteration_proto"],
)

proto_library(
name = "reporting_impression_qualification_filter_proto",
srcs = ["reporting_impression_qualification_filter.proto"],
strip_import_prefix = IMPORT_PREFIX,
deps = [
":impression_qualification_filter_spec_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
],
)

kt_jvm_proto_library(
name = "reporting_impression_qualification_filter_kt_jvm_proto",
deps = [":reporting_impression_qualification_filter_proto"],
)

proto_library(
name = "reporting_interval_proto",
srcs = ["reporting_interval.proto"],
strip_import_prefix = IMPORT_PREFIX,
deps = [
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/type:date_proto",
"@com_google_googleapis//google/type:datetime_proto",
],
)

kt_jvm_proto_library(
name = "reporting_interval_kt_jvm_proto",
deps = [":reporting_interval_proto"],
)

proto_library(
name = "reporting_unit_proto",
srcs = ["reporting_unit.proto"],
strip_import_prefix = IMPORT_PREFIX,
deps = [
":media_type_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
],
)

kt_jvm_proto_library(
name = "reporting_unit_kt_jvm_proto",
deps = [":reporting_unit_proto"],
)

proto_library(
name = "reporting_set_proto",
srcs = ["reporting_set.proto"],
Expand All @@ -146,6 +274,27 @@ proto_library(
],
)

proto_library(
name = "page_proto",
srcs = ["page.proto"],
strip_import_prefix = IMPORT_PREFIX,
deps = [
":metric_frequency_spec_proto",
":reporting_impression_qualification_filter_proto",
":reporting_unit_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
"@com_google_googleapis//google/type:dayofweek_proto",
"@com_google_googleapis//google/type:interval_proto",
"@com_google_protobuf//:timestamp_proto",
],
)

kt_jvm_proto_library(
name = "page_kt_jvm_proto",
deps = [":page_proto"],
)

proto_library(
name = "page_token_proto",
srcs = ["page_token.proto"],
Expand All @@ -160,6 +309,24 @@ kt_jvm_proto_library(
)

# Services.
proto_library(
name = "basic_reports_service_proto",
srcs = ["basic_reports_service.proto"],
strip_import_prefix = IMPORT_PREFIX,
deps = [
":basic_report_proto",
"@com_google_googleapis//google/api:annotations_proto",
"@com_google_googleapis//google/api:client_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
"@com_google_protobuf//:timestamp_proto",
],
)

kt_jvm_grpc_proto_library(
name = "basic_reports_service_kt_jvm_grpc_proto",
deps = [":basic_reports_service_proto"],
)

proto_library(
name = "event_groups_service_proto",
Expand All @@ -179,6 +346,27 @@ kt_jvm_grpc_proto_library(
deps = [":event_groups_service_proto"],
)

proto_library(
name = "impression_qualification_filters_service_proto",
srcs = ["impression_qualification_filters_service.proto"],
strip_import_prefix = IMPORT_PREFIX,
deps = [
":impression_qualification_filter_proto",
":impression_qualification_filter_spec_proto",
":media_type_proto",
"@com_google_googleapis//google/api:annotations_proto",
"@com_google_googleapis//google/api:client_proto",
"@com_google_googleapis//google/api:field_behavior_proto",
"@com_google_googleapis//google/api:resource_proto",
"@com_google_protobuf//:timestamp_proto",
],
)

kt_jvm_grpc_proto_library(
name = "impression_qualification_filters_service_kt_jvm_grpc_proto",
deps = [":impression_qualification_filters_service_proto"],
)

proto_library(
name = "metrics_service_proto",
srcs = ["metrics_service.proto"],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
// Copyright 2024 The Cross-Media Measurement Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package wfa.measurement.reporting.v2alpha;

import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/timestamp.proto";
import "wfa/measurement/reporting/v2alpha/media_type.proto";
import "wfa/measurement/reporting/v2alpha/page.proto";
import "wfa/measurement/reporting/v2alpha/reporting_impression_qualification_filter.proto";
import "wfa/measurement/reporting/v2alpha/reporting_interval.proto";

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

// Resource representing a Basic Report.
message BasicReport {
option (google.api.resource) = {
type: "reporting.halo-cmm.org/BasicReport"
pattern: "measurementConsumers/{measurement_consumer}/basicReports/{basic_report}"
singular: "basicReport"
plural: "basicReports"
};

// Resource name.
string name = 1 [(google.api.field_behavior) = IDENTIFIER];

// Human readable title of the report.
string title = 2 [(google.api.field_behavior) = IMMUTABLE];

// This is the resource name of a primitive Reporting Set that includes all of
// the Event Groups that may be reported on.
//
// Event Groups may span Data Providers and Media Types.
// Subsets of these can be reported on and are determined by PageSpec.
string campaign_group = 3 [(google.api.resource_reference) = {
type: "reporting.halo-cmm.org/ReportingSet"
}];

// The interval that the Report spans
//
// Both the start and the end of the interval are immutable.
ReportingInterval reporting_interval = 4 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = IMMUTABLE
];

// The set of filters for this report.
//
// There must be at most one entry per ImpressionQualificationFilter, and
// custom may be used no more than once.
repeated ReportingImpressionQualificationFilter
impression_qualification_filters = 6 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = IMMUTABLE
];

// The result for each item in `page_specs` in the same order.
repeated PageResult page_results = 8 [
(google.api.field_behavior) = IMMUTABLE,
(google.api.field_behavior) = OUTPUT_ONLY
];
}
Loading
Loading