From 0ee9cb747863a4a75b01b3783283c9ca3a7268d5 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Sun, 15 Dec 2024 22:51:06 +0000 Subject: [PATCH 01/52] substantial changes --- .../measurement/reporting/v2alpha/BUILD.bazel | 6 +- .../reporting/v2alpha/advanced_report.proto | 0 .../reporting/v2alpha/media_type.proto | 34 ---- .../reporting/v2alpha/reporting_common.proto | 150 ++++++++++++++++++ 4 files changed, 152 insertions(+), 38 deletions(-) create mode 100644 src/main/proto/wfa/measurement/reporting/v2alpha/advanced_report.proto delete mode 100644 src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto create mode 100644 src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel index 569cdc5c8b5..4c58913c8c5 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel @@ -113,13 +113,11 @@ 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"], + name = "impression_qualification_filter_kt_jvm_proto", + deps = [":impression_qualification_filter_proto"], ) proto_library( diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/advanced_report.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/advanced_report.proto new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto deleted file mode 100644 index 9134578efca..00000000000 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto +++ /dev/null @@ -1,34 +0,0 @@ -// 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; - -option java_package = "org.wfanet.measurement.reporting.v2alpha"; -option java_multiple_files = true; -option java_outer_classname = "MediaTypeProto"; - -// MediaType is used to designate how various artifacts -// should be interpreted for reporting. -enum MediaType { - // Default value. Unused. - MEDIA_TYPE_UNSPECIFIED = 0; - // Interpret a set of artifacts as Video - VIDEO = 1; - // Interpret a set of artifacts as Display - DISPLAY = 2; - // Interpret as set of artifacts as Other - OTHER = 3; -} diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto new file mode 100644 index 00000000000..00de45f71c3 --- /dev/null +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto @@ -0,0 +1,150 @@ +// 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"; + +option java_package = "org.wfanet.measurement.reporting.v2alpha"; +option java_multiple_files = true; +option java_outer_classname = "ReportingCommonProto"; + +// ReportingMediaType is used to designate how reporting artifacts +// should be interpreted for reporting. This designation could apply +// to EventGroups ReportingSets, filters, and more. Henceforth these are +// call artifacts. +// +// For example, the ReportingMediaType determines what MeasurementPolicy and +// filters to apply to the arifacts within a particular Report. +enum ReportingMediaType { + // Default value. Unused. + MEDIA_TYPE_UNSPECIFIED = 0; + // Interpret a set of arifacts as Cross Media + CROSS_MEDIA = 1; + // Interpret a set of arifacts as Video + VIDEO = 2; + // Interpret a set of arifacts as Display + DISPLAY = 3; + // Interpret as set of artifacts as Other + OTHER = 4; +} + +// The type of the unit being reported on +enum ReportingUnitType { + // Default value. Unused. + REPORTING_TYPE_UNSPECIFIED = 0; + // The artifact used by the reporting unit is a halo.wfanet.org/DataProvider + DATA_PROVIDER = 1; + // The artifact used by the reporting unit is a halo.wfanet.org/ReportingSet + // Phase III + // REPORTING_SET = 2; +} + +// Specifies the units to report on. +message ReportingUnit { + ReportingUnitType reporting_unit_type = 1; + + // A list of resources to report on. + // + // These names must have the type specified by the reporting unit type. + repeated string components = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { type: "*" } + ]; + + // Display names of the resource referendced by the Reporting Unit + repeated string display_name = 3 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IMMUTABLE + ]; + + // The Reporting Media Type to use when reporting on this Reporting Unit. + // + // Within a report this option determines which set of filters to apply. + // Impressions associated with the reporting units that do not correspond + // to the provided Reporting Media Type will be filtered out. + // If CROSS_MEDIA is specified all impressions are included. + ReportingMediaType reporting_media_type = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; +} + +// Specifies the impression filter for a ReportingMediaType. +// +// If particular filter values are not applicable to the media they +// are applied to it is an error (e.g. DISPLAY cannot be filtered by +// percent completion) +message ImpressionQualificationFilterSpec { + // The ReportingMediaType this filter applies to. + ReportingMediaType media_type = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Specifies a quantile + enum Quantile { + QUANTILE_UNSPECIFIED = 0; + // 0th percentile + ZERO = 1; + // 25th percentile + TWENTY_FIVE = 2; + // 50th percentile + FIFTY = 3; + // 75th percentile + SEVENTY_FIVE = 4; + // 100th percentile + ONE_HUNDRED = 5; + } + + // Specify a percent as a fraction or as a quantile + message Percent { + oneof value { + // The fraction + float fraction = 1 [(google.api.field_behavior) = IMMUTABLE]; + // The quantile + Quantile quantile = 2 [(google.api.field_behavior) = IMMUTABLE]; + } + } + + // Specifies the viewpability filter + Percent viewability = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + // Specifies the completion filter + Percent completion = 3 [(google.api.field_behavior) = IMMUTABLE]; +} + +// An impression qualification filter for reporting that allows either a named +// filter or a custom filter. +message ReportingImpressionQualificationFilter { + oneof filter { + // The resource name of an ImpressionQualificstionFilter. + // (e.g. "video/mrc") + string impression_qualification_filter = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "reporting.halo-cmm.org/ImpressionQualificationFilter" + } + ]; + // A custom filter + ImpressionQualificationFilterSpec custom = 2 + [(google.api.field_behavior) = IMMUTABLE]; + } +} From ad75508d76bb6fd75f1a4e763329fd9df2bd7d7a Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Sun, 15 Dec 2024 22:53:18 +0000 Subject: [PATCH 02/52] build update --- src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel index 4c58913c8c5..0c0bc12150a 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel @@ -113,6 +113,11 @@ proto_library( name = "media_type_proto", srcs = ["media_type.proto"], strip_import_prefix = IMPORT_PREFIX, + deps = [ + ":reporting_common_proto", + "@com_google_googleapis//google/api:field_behavior_proto", + "@com_google_googleapis//google/api:resource_proto", + ], ) kt_jvm_proto_library( From 98d6886c335b6590079d3139952467b7e6ab9ce6 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Mon, 16 Dec 2024 18:00:09 +0000 Subject: [PATCH 03/52] Api lint --- .../reporting/v2alpha/reporting_common.proto | 63 ++++++++++--------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto index 00de45f71c3..c3287df9458 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto @@ -23,39 +23,9 @@ option java_package = "org.wfanet.measurement.reporting.v2alpha"; option java_multiple_files = true; option java_outer_classname = "ReportingCommonProto"; -// ReportingMediaType is used to designate how reporting artifacts -// should be interpreted for reporting. This designation could apply -// to EventGroups ReportingSets, filters, and more. Henceforth these are -// call artifacts. -// -// For example, the ReportingMediaType determines what MeasurementPolicy and -// filters to apply to the arifacts within a particular Report. -enum ReportingMediaType { - // Default value. Unused. - MEDIA_TYPE_UNSPECIFIED = 0; - // Interpret a set of arifacts as Cross Media - CROSS_MEDIA = 1; - // Interpret a set of arifacts as Video - VIDEO = 2; - // Interpret a set of arifacts as Display - DISPLAY = 3; - // Interpret as set of artifacts as Other - OTHER = 4; -} - -// The type of the unit being reported on -enum ReportingUnitType { - // Default value. Unused. - REPORTING_TYPE_UNSPECIFIED = 0; - // The artifact used by the reporting unit is a halo.wfanet.org/DataProvider - DATA_PROVIDER = 1; - // The artifact used by the reporting unit is a halo.wfanet.org/ReportingSet - // Phase III - // REPORTING_SET = 2; -} - // Specifies the units to report on. message ReportingUnit { + // The type of the reporting unit ReportingUnitType reporting_unit_type = 1; // A list of resources to report on. @@ -99,6 +69,7 @@ message ImpressionQualificationFilterSpec { // Specifies a quantile enum Quantile { + // Default value. Unused. QUANTILE_UNSPECIFIED = 0; // 0th percentile ZERO = 1; @@ -148,3 +119,33 @@ message ReportingImpressionQualificationFilter { [(google.api.field_behavior) = IMMUTABLE]; } } + +// ReportingMediaType is used to designate how reporting artifacts +// should be interpreted for reporting. This designation could apply +// to EventGroups ReportingSets, filters, and more. Henceforth these are +// call artifacts. +// +// For example, the ReportingMediaType determines what MeasurementPolicy and +// filters to apply to the arifacts within a particular Report. +enum ReportingMediaType { + // Default value. Unused. + REPORTING_MEDIA_TYPE_UNSPECIFIED = 0; + // Interpret a set of arifacts as Cross Media + CROSS_MEDIA = 1; + // Interpret a set of arifacts as Video + VIDEO = 2; + // Interpret a set of arifacts as Display + DISPLAY = 3; + // Interpret as set of artifacts as Other + OTHER = 4; +} + +// The type of the unit being reported on +// +// TODO(@kungfucraig) Introduce REPORTING_SET for Phase III +enum ReportingUnitType { + // Default value. Unused. + REPORTING_UNIT_TYPE_UNSPECIFIED = 0; + // The artifact used by the reporting unit is a halo.wfanet.org/DataProvider + DATA_PROVIDER = 1; +} From e372bc4a44a4c3412a723cd419ea8bff98c6eeb5 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Mon, 16 Dec 2024 18:08:56 +0000 Subject: [PATCH 04/52] format + made reporting media types plural --- .../reporting/v2alpha/reporting_common.proto | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto index c3287df9458..bd5c2baf5a1 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto @@ -47,9 +47,15 @@ message ReportingUnit { // // Within a report this option determines which set of filters to apply. // Impressions associated with the reporting units that do not correspond - // to the provided Reporting Media Type will be filtered out. + // to the provided Reporting Media Types will be filtered out. // If CROSS_MEDIA is specified all impressions are included. - ReportingMediaType reporting_media_type = 4 [ + // + // If multiple values are specified then the set of filters that are + // applicable to all of them are used. For example if VIDEO + // and DISPLAY are specified and an MRC filter is available for both + // then the MRC filter, as it applies to the specific media type, + // is applied. + repeated ReportingMediaType reporting_media_types = 4 [ (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE ]; @@ -107,7 +113,7 @@ message ImpressionQualificationFilterSpec { message ReportingImpressionQualificationFilter { oneof filter { // The resource name of an ImpressionQualificstionFilter. - // (e.g. "video/mrc") + // (e.g. "mrc") string impression_qualification_filter = 1 [ (google.api.field_behavior) = IMMUTABLE, (google.api.resource_reference) = { From b79c9c544518d1ccf9c6d8b0280b95a91e21df22 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Mon, 16 Dec 2024 18:16:41 +0000 Subject: [PATCH 05/52] remove advacned report --- .../proto/wfa/measurement/reporting/v2alpha/advanced_report.proto | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/main/proto/wfa/measurement/reporting/v2alpha/advanced_report.proto diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/advanced_report.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/advanced_report.proto deleted file mode 100644 index e69de29bb2d..00000000000 From 888f56c76b1724432428c9948cf896777262475f Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Tue, 17 Dec 2024 01:14:14 +0000 Subject: [PATCH 06/52] updated from review --- .../measurement/reporting/v2alpha/BUILD.bazel | 14 ++ .../reporting/v2alpha/reporting_common.proto | 157 ------------------ 2 files changed, 14 insertions(+), 157 deletions(-) delete mode 100644 src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel index 0c0bc12150a..fb8e96f6656 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel @@ -125,6 +125,20 @@ kt_jvm_proto_library( 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 = [ + "@com_google_googleapis//google/api:field_behavior_proto", + ], +) + +kt_jvm_proto_library( + name = "impression_qualification_filter_spec_kt_jvm_proto", + deps = [":impression_qualification_filter_spec_proto"], +) + proto_library( name = "metric_proto", srcs = ["metric.proto"], diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto deleted file mode 100644 index bd5c2baf5a1..00000000000 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto +++ /dev/null @@ -1,157 +0,0 @@ -// 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"; - -option java_package = "org.wfanet.measurement.reporting.v2alpha"; -option java_multiple_files = true; -option java_outer_classname = "ReportingCommonProto"; - -// Specifies the units to report on. -message ReportingUnit { - // The type of the reporting unit - ReportingUnitType reporting_unit_type = 1; - - // A list of resources to report on. - // - // These names must have the type specified by the reporting unit type. - repeated string components = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE, - (google.api.resource_reference) = { type: "*" } - ]; - - // Display names of the resource referendced by the Reporting Unit - repeated string display_name = 3 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.field_behavior) = IMMUTABLE - ]; - - // The Reporting Media Type to use when reporting on this Reporting Unit. - // - // Within a report this option determines which set of filters to apply. - // Impressions associated with the reporting units that do not correspond - // to the provided Reporting Media Types will be filtered out. - // If CROSS_MEDIA is specified all impressions are included. - // - // If multiple values are specified then the set of filters that are - // applicable to all of them are used. For example if VIDEO - // and DISPLAY are specified and an MRC filter is available for both - // then the MRC filter, as it applies to the specific media type, - // is applied. - repeated ReportingMediaType reporting_media_types = 4 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; -} - -// Specifies the impression filter for a ReportingMediaType. -// -// If particular filter values are not applicable to the media they -// are applied to it is an error (e.g. DISPLAY cannot be filtered by -// percent completion) -message ImpressionQualificationFilterSpec { - // The ReportingMediaType this filter applies to. - ReportingMediaType media_type = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; - - // Specifies a quantile - enum Quantile { - // Default value. Unused. - QUANTILE_UNSPECIFIED = 0; - // 0th percentile - ZERO = 1; - // 25th percentile - TWENTY_FIVE = 2; - // 50th percentile - FIFTY = 3; - // 75th percentile - SEVENTY_FIVE = 4; - // 100th percentile - ONE_HUNDRED = 5; - } - - // Specify a percent as a fraction or as a quantile - message Percent { - oneof value { - // The fraction - float fraction = 1 [(google.api.field_behavior) = IMMUTABLE]; - // The quantile - Quantile quantile = 2 [(google.api.field_behavior) = IMMUTABLE]; - } - } - - // Specifies the viewpability filter - Percent viewability = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; - // Specifies the completion filter - Percent completion = 3 [(google.api.field_behavior) = IMMUTABLE]; -} - -// An impression qualification filter for reporting that allows either a named -// filter or a custom filter. -message ReportingImpressionQualificationFilter { - oneof filter { - // The resource name of an ImpressionQualificstionFilter. - // (e.g. "mrc") - string impression_qualification_filter = 1 [ - (google.api.field_behavior) = IMMUTABLE, - (google.api.resource_reference) = { - type: "reporting.halo-cmm.org/ImpressionQualificationFilter" - } - ]; - // A custom filter - ImpressionQualificationFilterSpec custom = 2 - [(google.api.field_behavior) = IMMUTABLE]; - } -} - -// ReportingMediaType is used to designate how reporting artifacts -// should be interpreted for reporting. This designation could apply -// to EventGroups ReportingSets, filters, and more. Henceforth these are -// call artifacts. -// -// For example, the ReportingMediaType determines what MeasurementPolicy and -// filters to apply to the arifacts within a particular Report. -enum ReportingMediaType { - // Default value. Unused. - REPORTING_MEDIA_TYPE_UNSPECIFIED = 0; - // Interpret a set of arifacts as Cross Media - CROSS_MEDIA = 1; - // Interpret a set of arifacts as Video - VIDEO = 2; - // Interpret a set of arifacts as Display - DISPLAY = 3; - // Interpret as set of artifacts as Other - OTHER = 4; -} - -// The type of the unit being reported on -// -// TODO(@kungfucraig) Introduce REPORTING_SET for Phase III -enum ReportingUnitType { - // Default value. Unused. - REPORTING_UNIT_TYPE_UNSPECIFIED = 0; - // The artifact used by the reporting unit is a halo.wfanet.org/DataProvider - DATA_PROVIDER = 1; -} From 310bd979112dadabddedf9e316f2f0a58cbb15fa Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Wed, 18 Dec 2024 00:30:27 +0000 Subject: [PATCH 07/52] added impression qualification server, lint errors, review comments --- .../proto/wfa/measurement/reporting/v2alpha/BUILD.bazel | 1 + .../v2alpha/impression_qualification_filter.proto | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel index fb8e96f6656..1dec08df108 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel @@ -131,6 +131,7 @@ proto_library( strip_import_prefix = IMPORT_PREFIX, deps = [ "@com_google_googleapis//google/api:field_behavior_proto", + "@com_google_protobuf//:duration_proto", ], ) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto index f5c9979f50a..5298964c17e 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto @@ -56,4 +56,12 @@ message ImpressionQualificationFilter { (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE ]; + + // The filter category (e.g. MRC) + // + // This allows filters to be grouped by category across Filter Types + string category = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = IMMUTABLE + ]; } From 18ec1755708beef909e26a98c8e577d37c55f6c0 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Wed, 18 Dec 2024 16:26:27 +0000 Subject: [PATCH 08/52] revert formatting --- .../measurement/reporting/v2alpha/event_groups_service.proto | 2 +- .../reporting/v2alpha/metric_calculation_specs_service.proto | 2 +- .../wfa/measurement/reporting/v2alpha/metrics_service.proto | 2 +- .../reporting/v2alpha/report_schedule_iterations_service.proto | 2 +- .../reporting/v2alpha/report_schedules_service.proto | 2 +- .../measurement/reporting/v2alpha/reporting_sets_service.proto | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/event_groups_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/event_groups_service.proto index 71ecab7695d..07ac9d457c8 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/event_groups_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/event_groups_service.proto @@ -16,9 +16,9 @@ syntax = "proto3"; package wfa.measurement.reporting.v2alpha; -import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/annotations.proto"; import "google/api/resource.proto"; import "wfa/measurement/reporting/v2alpha/event_group.proto"; diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/metric_calculation_specs_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/metric_calculation_specs_service.proto index a1d09817c3c..7a82254e925 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/metric_calculation_specs_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/metric_calculation_specs_service.proto @@ -16,9 +16,9 @@ syntax = "proto3"; package wfa.measurement.reporting.v2alpha; -import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/annotations.proto"; import "google/api/resource.proto"; import "wfa/measurement/reporting/v2alpha/metric_calculation_spec.proto"; diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/metrics_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/metrics_service.proto index d4168279f6f..dcfe8826e95 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/metrics_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/metrics_service.proto @@ -16,9 +16,9 @@ syntax = "proto3"; package wfa.measurement.reporting.v2alpha; -import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/annotations.proto"; import "google/api/resource.proto"; import "wfa/measurement/reporting/v2alpha/metric.proto"; diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/report_schedule_iterations_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/report_schedule_iterations_service.proto index 9f7f3319aaa..d1e50a59ab6 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/report_schedule_iterations_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/report_schedule_iterations_service.proto @@ -16,9 +16,9 @@ syntax = "proto3"; package wfa.measurement.reporting.v2alpha; -import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/annotations.proto"; import "google/api/resource.proto"; import "wfa/measurement/reporting/v2alpha/report_schedule_iteration.proto"; diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/report_schedules_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/report_schedules_service.proto index 59c6929fdae..040cfc4e3ab 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/report_schedules_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/report_schedules_service.proto @@ -16,9 +16,9 @@ syntax = "proto3"; package wfa.measurement.reporting.v2alpha; -import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/annotations.proto"; import "google/api/resource.proto"; import "wfa/measurement/reporting/v2alpha/report_schedule.proto"; diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_sets_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_sets_service.proto index 9ccfdd876bb..195dfedbdb5 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_sets_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_sets_service.proto @@ -16,9 +16,9 @@ syntax = "proto3"; package wfa.measurement.reporting.v2alpha; -import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/annotations.proto"; import "google/api/resource.proto"; import "wfa/measurement/reporting/v2alpha/reporting_set.proto"; From cd1f57e9b576c0ce553f39acc1d8c69fb238f4dd Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Wed, 18 Dec 2024 16:27:08 +0000 Subject: [PATCH 09/52] revert formatting --- .../wfa/measurement/reporting/v2alpha/reports_service.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/reports_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/reports_service.proto index bcbe24b12d2..3af93e58831 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/reports_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/reports_service.proto @@ -16,9 +16,9 @@ syntax = "proto3"; package wfa.measurement.reporting.v2alpha; -import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/annotations.proto"; import "google/api/resource.proto"; import "wfa/measurement/reporting/v2alpha/report.proto"; From 634421e89f8111c50bc850084860d3b723108247 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Thu, 2 Jan 2025 19:48:26 +0000 Subject: [PATCH 10/52] update from advanced report work --- .../measurement/reporting/v2alpha/BUILD.bazel | 116 ++++++++++++++++++ .../impression_qualification_filter.proto | 8 +- .../reporting/v2alpha/media_type.proto | 34 +++++ .../measurement/reporting/v2alpha/page.proto | 14 +++ .../reporting/v2alpha/reporting_unit.proto | 1 + 5 files changed, 169 insertions(+), 4 deletions(-) create mode 100644 src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel index 1dec08df108..8ff3dd4ebb4 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel @@ -13,11 +13,33 @@ IMPORT_PREFIX = "/src/main/proto" # Resources and shared message types. +proto_library( + name = "advanced_report_proto", + srcs = ["advanced_report.proto"], + strip_import_prefix = IMPORT_PREFIX, + deps = [ + ":media_type_proto", + ":metric_frequency_spec_proto", + ":reporting_interval_proto", + ":reporting_impression_qualification_filter_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_protobuf//:timestamp_proto", + ], +) + +kt_jvm_proto_library( + name = "advanced_report_kt_jvm_proto", + deps = [":advanced_report_proto"], +) + 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", @@ -140,6 +162,19 @@ kt_jvm_proto_library( 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"], @@ -284,6 +319,7 @@ proto_library( 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", ], @@ -319,6 +355,25 @@ proto_library( ], ) +proto_library( + name = "operation_proto", + srcs = ["operation.proto"], + strip_import_prefix = IMPORT_PREFIX, + deps = [ + "@com_google_googleapis//google/api:field_behavior_proto", + "@com_google_googleapis//google/api:resource_proto", + "@com_google_googleapis//google/type:date_proto", + "@com_google_googleapis//google/type:datetime_proto", + "@com_google_googleapis//google/type:dayofweek_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +kt_jvm_proto_library( + name = "operation_kt_jvm_proto", + deps = [":operation_proto"], +) + proto_library( name = "page_proto", srcs = ["page.proto"], @@ -342,6 +397,22 @@ kt_jvm_proto_library( deps = [":page_proto"], ) +proto_library( + name = "page_template_proto", + srcs = ["page_template.proto"], + strip_import_prefix = IMPORT_PREFIX, + deps = [ + ":page_proto", + "@com_google_googleapis//google/api:field_behavior_proto", + "@com_google_googleapis//google/api:resource_proto", + ], +) + +kt_jvm_proto_library( + name = "page_template_kt_jvm_proto", + deps = [":page_template_proto"], +) + proto_library( name = "page_token_proto", srcs = ["page_token.proto"], @@ -356,6 +427,30 @@ kt_jvm_proto_library( ) # Services. +proto_library( + name = "advanced_reports_service_proto", + srcs = ["advanced_reports_service.proto"], + strip_import_prefix = IMPORT_PREFIX, + deps = [ + ":advanced_report_proto", + ":operation_proto", + ":page_proto", + ":reporting_interval_proto", + ":reporting_unit_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//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +kt_jvm_grpc_proto_library( + name = "advanced_reports_service_kt_jvm_grpc_proto", + deps = [":advanced_reports_service_proto"], +) + proto_library( name = "basic_reports_service_proto", srcs = ["basic_reports_service.proto"], @@ -450,6 +545,27 @@ kt_jvm_grpc_proto_library( deps = [":metric_calculation_specs_service_proto"], ) +proto_library( + name = "page_templates_service_proto", + srcs = ["page_templates_service.proto"], + strip_import_prefix = IMPORT_PREFIX, + deps = [ + ":page_proto", + ":page_template_proto", + ":reporting_unit_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 = "page_templates_service_kt_jvm_grpc_proto", + deps = [":page_templates_service_proto"], +) + proto_library( name = "reports_service_proto", srcs = ["reports_service.proto"], diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto index 5298964c17e..934a526be15 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto @@ -57,11 +57,11 @@ message ImpressionQualificationFilter { (google.api.field_behavior) = IMMUTABLE ]; - // The filter category (e.g. MRC) + // Specifies the filter criteria for each MediaType. // - // This allows filters to be grouped by category across Filter Types - string category = 3 [ - (google.api.field_behavior) = OPTIONAL, + // They may be at most one spec per MediaType. + repeated ImpressionQualificationFilterSpec filter_specs = 4 [ + (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE ]; } diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto new file mode 100644 index 00000000000..3868ae7d986 --- /dev/null +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto @@ -0,0 +1,34 @@ +// 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; + +option java_package = "org.wfanet.measurement.reporting.v2alpha"; +option java_multiple_files = true; +option java_outer_classname = "MediaTypeProto"; + +// MediaType is used to designate how reporting artifacts +// should be interpreted for reporting. +enum MediaType { + // Default value. Unused. + MEDIA_TYPE_UNSPECIFIED = 0; + // Interpret a set of arifacts as Video + VIDEO = 1; + // Interpret a set of arifacts as Display + DISPLAY = 2; + // Interpret as set of artifacts as Other + OTHER = 3; +} diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto index daed51eda89..fad04450d30 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto @@ -221,3 +221,17 @@ message Page { // that was applicable to the page. repeated Result results = 2; } + +// The result for a single PageSpec +// +// There will be one Page per active ImpresionQualificationFilter. +// See the definition of `ReportingImpressionQualificationFilter` for details +// on what it means for a filter to be active. +message PageResult { + // A map of the name of the impression qualification filter used to compute a + // Page of results to that Page. + // + // This is either the resource name of an ImpressionQualificationResource or + // the string "custom" indicating that custom filters were applied. + map page = 1 [(google.api.field_behavior) = IMMUTABLE]; +} diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_unit.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_unit.proto index 13c9410e5e7..67667048cca 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_unit.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_unit.proto @@ -18,6 +18,7 @@ package wfa.measurement.reporting.v2alpha; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "wfa/measurement/reporting/v2alpha/media_type.proto"; option java_package = "org.wfanet.measurement.reporting.v2alpha"; option java_multiple_files = true; From 5e774d0991916d1f23f2661d5dc85028ede48473 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Thu, 2 Jan 2025 19:50:24 +0000 Subject: [PATCH 11/52] remove new build tagets --- .../measurement/reporting/v2alpha/BUILD.bazel | 101 ------------------ 1 file changed, 101 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel index 8ff3dd4ebb4..8d857918bed 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel @@ -13,27 +13,6 @@ IMPORT_PREFIX = "/src/main/proto" # Resources and shared message types. -proto_library( - name = "advanced_report_proto", - srcs = ["advanced_report.proto"], - strip_import_prefix = IMPORT_PREFIX, - deps = [ - ":media_type_proto", - ":metric_frequency_spec_proto", - ":reporting_interval_proto", - ":reporting_impression_qualification_filter_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_protobuf//:timestamp_proto", - ], -) - -kt_jvm_proto_library( - name = "advanced_report_kt_jvm_proto", - deps = [":advanced_report_proto"], -) - proto_library( name = "basic_report_proto", srcs = ["basic_report.proto"], @@ -355,25 +334,6 @@ proto_library( ], ) -proto_library( - name = "operation_proto", - srcs = ["operation.proto"], - strip_import_prefix = IMPORT_PREFIX, - deps = [ - "@com_google_googleapis//google/api:field_behavior_proto", - "@com_google_googleapis//google/api:resource_proto", - "@com_google_googleapis//google/type:date_proto", - "@com_google_googleapis//google/type:datetime_proto", - "@com_google_googleapis//google/type:dayofweek_proto", - "@com_google_protobuf//:timestamp_proto", - ], -) - -kt_jvm_proto_library( - name = "operation_kt_jvm_proto", - deps = [":operation_proto"], -) - proto_library( name = "page_proto", srcs = ["page.proto"], @@ -397,22 +357,6 @@ kt_jvm_proto_library( deps = [":page_proto"], ) -proto_library( - name = "page_template_proto", - srcs = ["page_template.proto"], - strip_import_prefix = IMPORT_PREFIX, - deps = [ - ":page_proto", - "@com_google_googleapis//google/api:field_behavior_proto", - "@com_google_googleapis//google/api:resource_proto", - ], -) - -kt_jvm_proto_library( - name = "page_template_kt_jvm_proto", - deps = [":page_template_proto"], -) - proto_library( name = "page_token_proto", srcs = ["page_token.proto"], @@ -427,30 +371,6 @@ kt_jvm_proto_library( ) # Services. -proto_library( - name = "advanced_reports_service_proto", - srcs = ["advanced_reports_service.proto"], - strip_import_prefix = IMPORT_PREFIX, - deps = [ - ":advanced_report_proto", - ":operation_proto", - ":page_proto", - ":reporting_interval_proto", - ":reporting_unit_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//:field_mask_proto", - "@com_google_protobuf//:timestamp_proto", - ], -) - -kt_jvm_grpc_proto_library( - name = "advanced_reports_service_kt_jvm_grpc_proto", - deps = [":advanced_reports_service_proto"], -) - proto_library( name = "basic_reports_service_proto", srcs = ["basic_reports_service.proto"], @@ -545,27 +465,6 @@ kt_jvm_grpc_proto_library( deps = [":metric_calculation_specs_service_proto"], ) -proto_library( - name = "page_templates_service_proto", - srcs = ["page_templates_service.proto"], - strip_import_prefix = IMPORT_PREFIX, - deps = [ - ":page_proto", - ":page_template_proto", - ":reporting_unit_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 = "page_templates_service_kt_jvm_grpc_proto", - deps = [":page_templates_service_proto"], -) - proto_library( name = "reports_service_proto", srcs = ["reports_service.proto"], From 3f20aef353863e76b82dddf3d6f8bb5aca70e7b8 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Thu, 2 Jan 2025 20:38:45 +0000 Subject: [PATCH 12/52] more from my review --- ...ting_impression_qualification_filter.proto | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_impression_qualification_filter.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_impression_qualification_filter.proto index 18d750226ed..642c68b068b 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_impression_qualification_filter.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_impression_qualification_filter.proto @@ -26,6 +26,26 @@ option java_outer_classname = "ReportingImpressionQualificationFilterProto"; // An impression qualification filter for reporting that allows either a named // filter or a custom filter. +// +// A filter can apply to one or more Media Types, and it is applied +// to each reporting unit (i.e. the containeres of EventGroups - +// ReportingSet or CampaignGroup) under the following conditions: +// 1. Within the scope of a Report, the Media Type(s) of a reporting unit +// are defined as the intersection of the reporting unit's actual Media +// Types and the report's Media Type filters. This is called the scoped +// Media Type. For exmaple, if the Event Gruops of the reporting +// unit have MediaType=[VIDEO, DISPLAY] and the report has a +// MediaType filter = [VIDEO], then the scoped Media Type of the +// reporting unit is VIDEO. +// 2. If the scoped Media Type of a reporting unit intersects the Media +// Types of a filter catetory then the scoped Media Types of the +// reporting unit must be equal to or a proper subset of this filter's +// MediaTypes. Otherwise, if there is an intersection it is an error. +// This is to avoid omitting impressions that might otherwise be +// expected to be counted. +// 3. If the scoped Media Type of a reporting unit does not intersect with +// the filter's MediaTypes then the metrics computed using that filter +// do not include that Reporting Set. message ReportingImpressionQualificationFilter { // The custom filter criteria for one or more MediaTypes message CustomImpressionQualificationFilterSpec { From 209afe2c4097c8940fcdad0680434df2eb5aee5d Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Fri, 3 Jan 2025 19:25:48 +0000 Subject: [PATCH 13/52] updated from review --- .../measurement/reporting/v2alpha/page.proto | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto index fad04450d30..f9ebb23d276 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto @@ -228,10 +228,24 @@ message Page { // See the definition of `ReportingImpressionQualificationFilter` for details // on what it means for a filter to be active. message PageResult { - // A map of the name of the impression qualification filter used to compute a - // Page of results to that Page. - // - // This is either the resource name of an ImpressionQualificationResource or - // the string "custom" indicating that custom filters were applied. - map page = 1 [(google.api.field_behavior) = IMMUTABLE]; + // Stores a Page of results along with the impression qualification filter + // that was applied while computing it. + message PageAndFilter { + oneof filter { + // The ImpressionQualificationFilter used to filter the impressions + string impression_qualification_filter = 1 [ + (google.api.resource_reference) = { + type: "reporting.halo-cmm.org/ImpressionQualificationFilter" + }, + (google.api.field_behavior) = IMMUTABLE + ]; + // Specifies that a custom filter was used to filter the impressions + bool custom = 2 [(google.api.field_behavior) = IMMUTABLE]; + } + // The Page of results + Page page = 3 [(google.api.field_behavior) = IMMUTABLE]; + } + // Stores each Page of results along with the impression qualification filter + // used to compute it. + repeated PageAndFilter pages = 1 [(google.api.field_behavior) = IMMUTABLE]; } From 83262beffc1a16b5c856a9a67cac8432848f6aeb Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Fri, 3 Jan 2025 19:31:35 +0000 Subject: [PATCH 14/52] page update --- .../wfa/measurement/reporting/v2alpha/page.proto | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto index f9ebb23d276..764ae5f27da 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto @@ -228,24 +228,25 @@ message Page { // See the definition of `ReportingImpressionQualificationFilter` for details // on what it means for a filter to be active. message PageResult { - // Stores a Page of results along with the impression qualification filter - // that was applied while computing it. + // Contains a Page of results along with the impression qualification filter + // that was applied when computing it. message PageAndFilter { + // The filter. Required. oneof filter { - // The ImpressionQualificationFilter used to filter the impressions + // The ImpressionQualificationFilter used to filter the impressions. string impression_qualification_filter = 1 [ (google.api.resource_reference) = { type: "reporting.halo-cmm.org/ImpressionQualificationFilter" }, (google.api.field_behavior) = IMMUTABLE ]; - // Specifies that a custom filter was used to filter the impressions + // Specifies that a custom filter was used to filter the impressions. bool custom = 2 [(google.api.field_behavior) = IMMUTABLE]; } - // The Page of results + // The Page of results. Page page = 3 [(google.api.field_behavior) = IMMUTABLE]; } - // Stores each Page of results along with the impression qualification filter + // Contains each Page of results along with the impression qualification filter // used to compute it. repeated PageAndFilter pages = 1 [(google.api.field_behavior) = IMMUTABLE]; } From 8adfb97e451b3a4af69fd840ead55f288f77dd83 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Fri, 3 Jan 2025 20:29:04 +0000 Subject: [PATCH 15/52] updates --- .../measurement/reporting/v2alpha/page.proto | 45 +++++++++++-------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto index 764ae5f27da..72c9a46be1a 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto @@ -228,25 +228,32 @@ message Page { // See the definition of `ReportingImpressionQualificationFilter` for details // on what it means for a filter to be active. message PageResult { + // Entry for the `pages` map. + message PagesMapEntry { + // Map entry key. + string key = 1 [ + (google.api.resource_reference) = { + type: "reporting.halo-cmm.org/ImpressionQualificationFilter" + }, + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // Map entry value. + Page value = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + } + + // Map of `ImpressionQualificationFilter` to `Page`. + repeated PagesMapEntry pages = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // The `Page` entry for a custom filter. + Page custom_filter_page = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OPTIONAL + ]; // Contains a Page of results along with the impression qualification filter // that was applied when computing it. - message PageAndFilter { - // The filter. Required. - oneof filter { - // The ImpressionQualificationFilter used to filter the impressions. - string impression_qualification_filter = 1 [ - (google.api.resource_reference) = { - type: "reporting.halo-cmm.org/ImpressionQualificationFilter" - }, - (google.api.field_behavior) = IMMUTABLE - ]; - // Specifies that a custom filter was used to filter the impressions. - bool custom = 2 [(google.api.field_behavior) = IMMUTABLE]; - } - // The Page of results. - Page page = 3 [(google.api.field_behavior) = IMMUTABLE]; - } - // Contains each Page of results along with the impression qualification filter - // used to compute it. - repeated PageAndFilter pages = 1 [(google.api.field_behavior) = IMMUTABLE]; } From b7e0bb1e4dca51cf26cc85422908206905a0d6f2 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Fri, 3 Jan 2025 20:33:57 +0000 Subject: [PATCH 16/52] remove stray text --- src/main/proto/wfa/measurement/reporting/v2alpha/page.proto | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto index 72c9a46be1a..36eb2a39f80 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto @@ -254,6 +254,4 @@ message PageResult { (google.api.field_behavior) = IMMUTABLE, (google.api.field_behavior) = OPTIONAL ]; - // Contains a Page of results along with the impression qualification filter - // that was applied when computing it. } From eb03c308aa661e9090d48e5a377742b3aa95f8f1 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Tue, 7 Jan 2025 17:28:25 +0000 Subject: [PATCH 17/52] updated tags --- .../proto/wfa/measurement/reporting/v2alpha/basic_report.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto index 9b5f8f3a725..f2b56ab0b38 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto @@ -70,7 +70,7 @@ message BasicReport { // The custom criteria and any specific impression_qualification_filter may // each be used at most once. repeated ReportingImpressionQualificationFilter - impression_qualification_filters = 6 [ + impression_qualification_filters = 5 [ (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE ]; From dd987688cd1e38e1ff8e885ed1ac02e88656fa15 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Tue, 7 Jan 2025 19:04:57 +0000 Subject: [PATCH 18/52] Moved event filter into its own file and used it to define IQF. --- .../wfa/measurement/reporting/v2alpha/BUILD.bazel | 10 +++++----- .../measurement/reporting/v2alpha/basic_report.proto | 2 +- .../v2alpha/impression_qualification_filter_spec.proto | 2 +- .../proto/wfa/measurement/reporting/v2alpha/page.proto | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel index 8d857918bed..97afb32215f 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel @@ -261,6 +261,11 @@ kt_jvm_proto_library( deps = [":report_schedule_iteration_proto"], ) +kt_jvm_proto_library( + name = "reporting_impression_qualification_filter_kt_jvm_proto", + deps = [":reporting_impression_qualification_filter_proto"], +) + proto_library( name = "reporting_impression_qualification_filter_proto", srcs = ["reporting_impression_qualification_filter.proto"], @@ -272,11 +277,6 @@ proto_library( ], ) -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"], diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto index f2b56ab0b38..a4872ea1bf7 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto @@ -1,4 +1,4 @@ -// Copyright 2024 The Cross-Media Measurement Authors +// Copyright 2025 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. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter_spec.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter_spec.proto index 1607221bfba..9f4f48be2a1 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter_spec.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter_spec.proto @@ -1,4 +1,4 @@ -// Copyright 2024 The Cross-Media Measurement Authors +// Copyright 2025 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. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto index 36eb2a39f80..bb051011f58 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto @@ -1,4 +1,4 @@ -// Copyright 2024 The Cross-Media Measurement Authors +// Copyright 2025 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. From 98c041a888ce2122463f626bc3a45a65fa6063bc Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Wed, 8 Jan 2025 01:24:49 +0000 Subject: [PATCH 19/52] update page --- .../v2alpha/basic_reports_service.proto | 2 +- .../impression_qualification_filter.proto | 2 +- ...ession_qualification_filters_service.proto | 2 +- .../reporting/v2alpha/media_type.proto | 4 ++-- .../metric_calculation_specs_service.proto | 2 +- .../v2alpha/metric_frequency_spec.proto | 2 +- .../reporting/v2alpha/metrics_service.proto | 2 +- .../report_schedule_iterations_service.proto | 2 +- .../v2alpha/report_schedules_service.proto | 2 +- ...ting_impression_qualification_filter.proto | 20 ------------------- .../v2alpha/reporting_sets_service.proto | 2 +- 11 files changed, 11 insertions(+), 31 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto index 60470c4d8a8..14f9e515282 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto @@ -1,4 +1,4 @@ -// Copyright 2024 The Cross-Media Measurement Authors +// Copyright 2025 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. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto index 934a526be15..1d0d6770f79 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto @@ -1,4 +1,4 @@ -// Copyright 2024 The Cross-Media Measurement Authors +// Copyright 2025 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. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filters_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filters_service.proto index b15b795e26d..7f495a468d2 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filters_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filters_service.proto @@ -1,4 +1,4 @@ -// Copyright 2024 The Cross-Media Measurement Authors +// Copyright 2025 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. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto index 3868ae7d986..a96a96a7373 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto @@ -1,4 +1,4 @@ -// Copyright 2024 The Cross-Media Measurement Authors +// Copyright 2025 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. @@ -20,7 +20,7 @@ option java_package = "org.wfanet.measurement.reporting.v2alpha"; option java_multiple_files = true; option java_outer_classname = "MediaTypeProto"; -// MediaType is used to designate how reporting artifacts +// MediaType is used to designate how various artifacts // should be interpreted for reporting. enum MediaType { // Default value. Unused. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/metric_calculation_specs_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/metric_calculation_specs_service.proto index 7a82254e925..a1d09817c3c 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/metric_calculation_specs_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/metric_calculation_specs_service.proto @@ -16,9 +16,9 @@ syntax = "proto3"; package wfa.measurement.reporting.v2alpha; +import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; -import "google/api/annotations.proto"; import "google/api/resource.proto"; import "wfa/measurement/reporting/v2alpha/metric_calculation_spec.proto"; diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/metric_frequency_spec.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/metric_frequency_spec.proto index 6c6a9f9a683..7eb6c5ef313 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/metric_frequency_spec.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/metric_frequency_spec.proto @@ -1,4 +1,4 @@ -// Copyright 2024 The Cross-Media Measurement Authors +// Copyright 2025 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. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/metrics_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/metrics_service.proto index dcfe8826e95..d4168279f6f 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/metrics_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/metrics_service.proto @@ -16,9 +16,9 @@ syntax = "proto3"; package wfa.measurement.reporting.v2alpha; +import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; -import "google/api/annotations.proto"; import "google/api/resource.proto"; import "wfa/measurement/reporting/v2alpha/metric.proto"; diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/report_schedule_iterations_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/report_schedule_iterations_service.proto index d1e50a59ab6..9f7f3319aaa 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/report_schedule_iterations_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/report_schedule_iterations_service.proto @@ -16,9 +16,9 @@ syntax = "proto3"; package wfa.measurement.reporting.v2alpha; +import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; -import "google/api/annotations.proto"; import "google/api/resource.proto"; import "wfa/measurement/reporting/v2alpha/report_schedule_iteration.proto"; diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/report_schedules_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/report_schedules_service.proto index 040cfc4e3ab..59c6929fdae 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/report_schedules_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/report_schedules_service.proto @@ -16,9 +16,9 @@ syntax = "proto3"; package wfa.measurement.reporting.v2alpha; +import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; -import "google/api/annotations.proto"; import "google/api/resource.proto"; import "wfa/measurement/reporting/v2alpha/report_schedule.proto"; diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_impression_qualification_filter.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_impression_qualification_filter.proto index 642c68b068b..18d750226ed 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_impression_qualification_filter.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_impression_qualification_filter.proto @@ -26,26 +26,6 @@ option java_outer_classname = "ReportingImpressionQualificationFilterProto"; // An impression qualification filter for reporting that allows either a named // filter or a custom filter. -// -// A filter can apply to one or more Media Types, and it is applied -// to each reporting unit (i.e. the containeres of EventGroups - -// ReportingSet or CampaignGroup) under the following conditions: -// 1. Within the scope of a Report, the Media Type(s) of a reporting unit -// are defined as the intersection of the reporting unit's actual Media -// Types and the report's Media Type filters. This is called the scoped -// Media Type. For exmaple, if the Event Gruops of the reporting -// unit have MediaType=[VIDEO, DISPLAY] and the report has a -// MediaType filter = [VIDEO], then the scoped Media Type of the -// reporting unit is VIDEO. -// 2. If the scoped Media Type of a reporting unit intersects the Media -// Types of a filter catetory then the scoped Media Types of the -// reporting unit must be equal to or a proper subset of this filter's -// MediaTypes. Otherwise, if there is an intersection it is an error. -// This is to avoid omitting impressions that might otherwise be -// expected to be counted. -// 3. If the scoped Media Type of a reporting unit does not intersect with -// the filter's MediaTypes then the metrics computed using that filter -// do not include that Reporting Set. message ReportingImpressionQualificationFilter { // The custom filter criteria for one or more MediaTypes message CustomImpressionQualificationFilterSpec { diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_sets_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_sets_service.proto index 195dfedbdb5..9ccfdd876bb 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_sets_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_sets_service.proto @@ -16,9 +16,9 @@ syntax = "proto3"; package wfa.measurement.reporting.v2alpha; +import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; -import "google/api/annotations.proto"; import "google/api/resource.proto"; import "wfa/measurement/reporting/v2alpha/reporting_set.proto"; From 8a89e049c550b5757b4cfffa496c49167d709689 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Wed, 8 Jan 2025 01:50:39 +0000 Subject: [PATCH 20/52] updated page significantly --- .../measurement/reporting/v2alpha/event_groups_service.proto | 2 +- .../wfa/measurement/reporting/v2alpha/reports_service.proto | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/event_groups_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/event_groups_service.proto index 07ac9d457c8..71ecab7695d 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/event_groups_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/event_groups_service.proto @@ -16,9 +16,9 @@ syntax = "proto3"; package wfa.measurement.reporting.v2alpha; +import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; -import "google/api/annotations.proto"; import "google/api/resource.proto"; import "wfa/measurement/reporting/v2alpha/event_group.proto"; diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/reports_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/reports_service.proto index 3af93e58831..bcbe24b12d2 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/reports_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/reports_service.proto @@ -16,9 +16,9 @@ syntax = "proto3"; package wfa.measurement.reporting.v2alpha; +import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; -import "google/api/annotations.proto"; import "google/api/resource.proto"; import "wfa/measurement/reporting/v2alpha/report.proto"; From 816cbed2a23eafa69abfdc04898de1d3c35f3c1a Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Thu, 9 Jan 2025 18:18:23 +0000 Subject: [PATCH 21/52] Update documentation and update ReportingUnit and its Summary --- .../proto/wfa/measurement/reporting/v2alpha/page.proto | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto index bb051011f58..70c204f0bcf 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto @@ -98,6 +98,14 @@ message Page { repeated ReportingUnitComponentSummary reporting_unit_component_summary = 1 [(google.api.field_behavior) = IMMUTABLE]; } + + // A summary of each component of the reporting_unit used to generate the + // Page + message ReportingUnitSummary { + // Component summaries + repeated ReportingUnitComponentSummary reporting_unit_component_summary = + 1 [(google.api.field_behavior) = IMMUTABLE]; + } // A summary of the ReportingUnit ReportingUnitSummary reporting_unit_summary = 1 [(google.api.field_behavior) = IMMUTABLE]; From 773bfce5cad1999480c5c32df72f2d98e14f3653 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Thu, 9 Jan 2025 18:24:52 +0000 Subject: [PATCH 22/52] updated documentation --- src/main/proto/wfa/measurement/reporting/v2alpha/page.proto | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto index 70c204f0bcf..45f3ffe27aa 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto @@ -99,8 +99,7 @@ message Page { 1 [(google.api.field_behavior) = IMMUTABLE]; } - // A summary of each component of the reporting_unit used to generate the - // Page + // A summary of each component of the reporting_unit reported on message ReportingUnitSummary { // Component summaries repeated ReportingUnitComponentSummary reporting_unit_component_summary = From c062bab5430f7440026b5ac6ac3ae00dcda7fd22 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Thu, 9 Jan 2025 18:45:26 +0000 Subject: [PATCH 23/52] Corrected order of build tagets --- .../wfa/measurement/reporting/v2alpha/BUILD.bazel | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel index 97afb32215f..8d857918bed 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel @@ -261,11 +261,6 @@ kt_jvm_proto_library( deps = [":report_schedule_iteration_proto"], ) -kt_jvm_proto_library( - name = "reporting_impression_qualification_filter_kt_jvm_proto", - deps = [":reporting_impression_qualification_filter_proto"], -) - proto_library( name = "reporting_impression_qualification_filter_proto", srcs = ["reporting_impression_qualification_filter.proto"], @@ -277,6 +272,11 @@ proto_library( ], ) +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"], From 62e9554757907866773c30e54710bc17f96c9f50 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Mon, 13 Jan 2025 20:16:32 +0000 Subject: [PATCH 24/52] updated copyright to be when files were first published --- .../proto/wfa/measurement/reporting/v2alpha/basic_report.proto | 2 +- .../measurement/reporting/v2alpha/basic_reports_service.proto | 2 +- .../reporting/v2alpha/impression_qualification_filter.proto | 2 +- .../v2alpha/impression_qualification_filter_spec.proto | 2 +- .../v2alpha/impression_qualification_filters_service.proto | 2 +- .../proto/wfa/measurement/reporting/v2alpha/media_type.proto | 2 +- .../measurement/reporting/v2alpha/metric_frequency_spec.proto | 2 +- src/main/proto/wfa/measurement/reporting/v2alpha/page.proto | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto index a4872ea1bf7..f2b56ab0b38 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto @@ -1,4 +1,4 @@ -// Copyright 2025 The Cross-Media Measurement Authors +// 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. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto index 14f9e515282..60470c4d8a8 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 The Cross-Media Measurement Authors +// 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. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto index 1d0d6770f79..934a526be15 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto @@ -1,4 +1,4 @@ -// Copyright 2025 The Cross-Media Measurement Authors +// 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. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter_spec.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter_spec.proto index 9f4f48be2a1..1607221bfba 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter_spec.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter_spec.proto @@ -1,4 +1,4 @@ -// Copyright 2025 The Cross-Media Measurement Authors +// 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. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filters_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filters_service.proto index 7f495a468d2..b15b795e26d 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filters_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filters_service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 The Cross-Media Measurement Authors +// 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. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto index a96a96a7373..710876c799d 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto @@ -1,4 +1,4 @@ -// Copyright 2025 The Cross-Media Measurement Authors +// 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. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/metric_frequency_spec.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/metric_frequency_spec.proto index 7eb6c5ef313..6c6a9f9a683 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/metric_frequency_spec.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/metric_frequency_spec.proto @@ -1,4 +1,4 @@ -// Copyright 2025 The Cross-Media Measurement Authors +// 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. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto index 45f3ffe27aa..c3657ad333f 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto @@ -1,4 +1,4 @@ -// Copyright 2025 The Cross-Media Measurement Authors +// 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. From 210c548367b9895b4f7a1a9e4cbc570d177e52de Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Mon, 13 Jan 2025 22:02:19 +0000 Subject: [PATCH 25/52] lint --- src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel | 2 -- src/main/proto/wfa/measurement/reporting/v2alpha/page.proto | 1 + .../wfa/measurement/reporting/v2alpha/reporting_unit.proto | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel index 8d857918bed..477db8f8dd7 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel @@ -18,7 +18,6 @@ proto_library( srcs = ["basic_report.proto"], strip_import_prefix = IMPORT_PREFIX, deps = [ - ":media_type_proto", ":page_proto", ":reporting_impression_qualification_filter_proto", ":reporting_interval_proto", @@ -298,7 +297,6 @@ proto_library( 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", ], diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto index c3657ad333f..42ae57edcae 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto @@ -60,6 +60,7 @@ 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 // diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_unit.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_unit.proto index 67667048cca..13c9410e5e7 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_unit.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_unit.proto @@ -18,7 +18,6 @@ package wfa.measurement.reporting.v2alpha; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; -import "wfa/measurement/reporting/v2alpha/media_type.proto"; option java_package = "org.wfanet.measurement.reporting.v2alpha"; option java_multiple_files = true; From 33857470a0fc5500a300afdf2240378442484d44 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Tue, 14 Jan 2025 21:56:01 +0000 Subject: [PATCH 26/52] updated from discussion with Origin - campaign group name, grouping dimensions, event group summaries --- .../proto/wfa/measurement/reporting/v2alpha/media_type.proto | 4 ++-- src/main/proto/wfa/measurement/reporting/v2alpha/page.proto | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto index 710876c799d..9134578efca 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto @@ -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; diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto index 42ae57edcae..c3657ad333f 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto @@ -60,7 +60,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 // From d1ad53923af0e9825b497f80adea13e413496bbf Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Thu, 16 Jan 2025 21:59:58 +0000 Subject: [PATCH 27/52] updates from review --- .../proto/wfa/measurement/reporting/v2alpha/basic_report.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto index f2b56ab0b38..9b5f8f3a725 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto @@ -70,7 +70,7 @@ message BasicReport { // The custom criteria and any specific impression_qualification_filter may // each be used at most once. repeated ReportingImpressionQualificationFilter - impression_qualification_filters = 5 [ + impression_qualification_filters = 6 [ (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE ]; From 0a04e6f7a96c8043918e280427e01b4bf8a16871 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Wed, 8 Jan 2025 18:14:17 +0000 Subject: [PATCH 28/52] feat: Add protos for MC API Phase II. --- .../measurement/reporting/v2alpha/BUILD.bazel | 10 + .../reporting/v2alpha/basic_report.proto | 6 + .../v2alpha/basic_reports_service.proto | 37 ++++ .../measurement/reporting/v2alpha/page.proto | 178 ++++++++++++++++++ 4 files changed, 231 insertions(+) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel index 477db8f8dd7..1f27da7d10d 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel @@ -379,6 +379,7 @@ proto_library( "@com_google_googleapis//google/api:client_proto", "@com_google_googleapis//google/api:field_behavior_proto", "@com_google_googleapis//google/api:resource_proto", + "@com_google_googleapis//google/longrunning:operations_proto", "@com_google_protobuf//:timestamp_proto", ], ) @@ -463,6 +464,15 @@ kt_jvm_grpc_proto_library( deps = [":metric_calculation_specs_service_proto"], ) +# TODO(@kungfucraig): Figure out how to have a build rule for the operations service. +# proto_library( +# name = "operations_service_proto", +# srcs = ["???"], +# strip_import_prefix = IMPORT_PREFIX, +# deps = [ +# ], +# ) + proto_library( name = "reports_service_proto", srcs = ["reports_service.proto"], diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto index 9b5f8f3a725..01c927c0e67 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto @@ -75,6 +75,12 @@ message BasicReport { (google.api.field_behavior) = IMMUTABLE ]; + // Specifies the Pages to create + repeated PageSpec page_specs = 8 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + // The report results repeated Page pages = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto index 60470c4d8a8..ffb5a057d85 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto @@ -20,6 +20,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; import "google/protobuf/timestamp.proto"; import "wfa/measurement/reporting/v2alpha/basic_report.proto"; @@ -29,6 +30,16 @@ option java_outer_classname = "BasicReportsServiceProto"; // Service for managing `BasicReport` resources. service BasicReports { + // Creates a `BasicReport` + rpc CreateBasicReport(CreateBasicReportRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2alpha/{parent=measurementConsumers/*}/basicReports" + body: "basicReport" + }; + option (google.api.method_signature) = "parent,basicReport"; + } + // Returns the `BasicReport` with the given resource key. rpc GetBasicReport(GetBasicReportRequest) returns (BasicReport) { option (google.api.http) = { @@ -111,3 +122,29 @@ message ListBasicReportsResponse { // If this field is omitted, there are no subsequent pages. string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL]; } + +// Request message for `CreateBasicReport` method +message CreateBasicReportRequest { + // The parent Measurement Consumer + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "reporting.halo-cmm.org/BasicReport" + } + ]; + + // The ID to use for the Basic Report, which will become the final component + // of the Basic Report's resource name. + // + // This must conform to RFC 1034, with the additional restriction that all + // letters must be lower-case. + string page_template_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // The Basic Report to create. + BasicReport basic_report = 3; + + // A unique identifier for this request. Restricted to 36 ASCII characters. + // A random UUID is recommended. + // This request is only idempotent if a `request_id` is provided. + string request_id = 4; +} diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto index c3657ad333f..81afb39a442 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto @@ -52,6 +52,184 @@ message WindowingSpec { ]; } +// Defines the dimesions over which metrics are grouped and filtered. +message DimensionSpec { + // Specifies the dimensions on which to Group metrics + // + // Only those event template fields that are tagged as groupable + // and in the common template are supported. + message Grouping { + // A set field paths that indicate the dimensions to group by. + // + // Each field path is with respect to the 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`. + repeated string event_template_field = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + } + // Metric grouping + Grouping grouping = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // A conjunction of Event Filters + // + // Event Template fields that are used by any filter Terms must be + // tagged as filterable. + repeated EventFilter filters = 4 [(google.api.field_behavior) = IMMUTABLE]; +} + +// Specifies a set of metrics to be computed +message PageMetricSpec { + // If specified the total population for the specified groupings and + // filters that are associated with calculation spec is reported. + bool population_size = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // The set of basic metrics that can be computed for any aspect of the + // reporting_unit (e.g. the whole thing, a single component, intersections, + // etc.) + message BasicMetricSetSpec { + // The reach + bool reach = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // The reach divided by the population + bool percent_reach = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // The k plus reach up to the frequency specified. Value must be + // positive. + int32 k_plus_reach = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // This option requires that a positive value be given for + // k_plus_reach, in which case if specified the percent k+ + // reach values are also computed. + bool percent_k_plus_reach = 4 [(google.api.field_behavior) = IMMUTABLE]; + + // The average frequency + bool average_frequency = 5 [(google.api.field_behavior) = IMMUTABLE]; + + // The impression count + bool impressions = 6 [(google.api.field_behavior) = IMMUTABLE]; + + // Gross ratings points + bool grps = 7 [(google.api.field_behavior) = IMMUTABLE]; + } + + // Metrics to be computed over the entire reporting_unit + message ReportingUnitMetricSetSpec { + // Metrics for the union of the items in the reporting)unit + BasicMetricSetSpec basic = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Compute a stacked incremental reach result for the reporting_unit + // + // For example if the order of the items in the reporting_unit.units + // field is "rs1, rs2, rs3" then the following are reported: + // 1. The reach of rs1 + // 2. The incremental reach of (rs1+rs2) over rs1 + // (i.e. the unique contribution of rs2 with respect to rs2) + // 3. The incremental reach of (rs1+rs2+rs3) over (rs1+rs2) + // (i.e. the unique contribution of rs3 with respect to rs1 and rs2. + // + // In the case a output for a category of components is desired, this + // can be achieved by first grouping the components by category. Then + // once the output is provided the reach values for the components in the + // category can be summed. + // + // For example, assume we have components EDP1, EDP2, EDP3 and EDP1 + // is linear TV and EDP2 and EDP3 are digital, and suppose we want an + // incremental reach report of linear TV over digital. Then we can specify + // the reporting_unit components as [EDP2, EDP3, EDP1] and when the + // output is recieved sum the values for EDP2 and EDP3. This results + // in a vector where the first element is the combined reach of EDP2 + // and EDP3 and the second element is the incremental reach of EDP1 + // with respect to them. Note that it would also be okay to specify + // the components as [EDP3, EDP2, EDP1]. + bool stacked_incremental_reach = 2; + } + // The set of metrics to compute for the entire reporting_unit + ReportingUnitMetricSetSpec reporting_unit = 2; + + // Compute metrics that apply to each unit of the reporting_unit_spec + // with respect to all others. + message ComponentMetricSetSpec { + // The basic metrics for each ReportingUnit.unit + BasicMetricSetSpec basic = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Compute the unique reach of each reporting unit in the + // reporting_unit_spec with respect to all other reporting units. + // + // For example if reporting_sets=[RS1, RS2, RS3] the unique reach of + // RS1, RS2, and RS3 are computed. + // + // It is an error to specify this if only a single reporting unit is + // specified since it is the same thing as requesting union.reach. + bool unique_reach = 2 [(google.api.field_behavior) = IMMUTABLE]; + } + // If reporting_unit.component is of size 1 the metrics computed for the + // component are identical to those computed for the union. Specifying this + // value is not recommended in this case. + ComponentMetricSetSpec component = 3 + [(google.api.field_behavior) = IMMUTABLE]; + + // Request overlaps (i.e. intersections) of the various combinations + // of reporting_unit components + message ComponentIntersectionMetricSetSpec { + // The number of components that contribute to the intersection. + // + // For example, a value of 2 will provide all 2-way intersections of + // the reporting_unit_spec. A value of 2 and 3 will provide both the + // 2 and 3 way intersections. + // + // The max value is the number of distrinct reporting + // units in the reporting_unit + repeated int32 contributor_count = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // The set of metrics to be computed for each intersection + BasicMetricSetSpec basic = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + } + // Compute n-way intersections + ComponentIntersectionMetricSetSpec component_intersection = 4 + [(google.api.field_behavior) = IMMUTABLE]; +} + +// Specification for a Page of results. +message PageSpec { + // The title of the page + string title = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // The unit to compute metrics for + ReportingUnit reporting_unit = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Specifies the window over which metrics are computed + // and whether they are cumulative or not. + WindowingSpec windowing_spec = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Specfies the dimensions over which the report is filtered and grouped. + DimensionSpec dimension_spec = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Specifies the Metrics to compute. + PageMetricSpec page_metric_spec = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; +} + // A page of results. message Page { // The title of the page. From dc72d67dd85b1da5e866c687762ac3412ccc5cd0 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Thu, 9 Jan 2025 18:43:07 +0000 Subject: [PATCH 29/52] Addressed TODOs --- .../wfa/measurement/reporting/v2alpha/BUILD.bazel | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel index 1f27da7d10d..8508cd06fde 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel @@ -464,14 +464,10 @@ kt_jvm_grpc_proto_library( deps = [":metric_calculation_specs_service_proto"], ) -# TODO(@kungfucraig): Figure out how to have a build rule for the operations service. -# proto_library( -# name = "operations_service_proto", -# srcs = ["???"], -# strip_import_prefix = IMPORT_PREFIX, -# deps = [ -# ], -# ) +kt_jvm_grpc_proto_library( + name = "operations_service_kt_jvm_grpc_proto", + deps = ["@com_google_googleapis//google/longrunning:operations_proto",], +) proto_library( name = "reports_service_proto", From 0b54e3990f714855dac021db2cab84fe385a25ba Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Thu, 9 Jan 2025 19:00:06 +0000 Subject: [PATCH 30/52] update documentation and EG summary --- .../v2alpha/basic_reports_service.proto | 10 ++--- .../measurement/reporting/v2alpha/page.proto | 41 ++++++++----------- 2 files changed, 22 insertions(+), 29 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto index ffb5a057d85..8b7dd6530d0 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto @@ -114,7 +114,7 @@ message ListBasicReportsRequest { // Response message for `ListBasicReports` method. message ListBasicReportsResponse { - // The Basic Reports that met the filter criteria + // The BasicReports that met the filter criteria repeated BasicReport basic_reports = 1 [(google.api.field_behavior) = OPTIONAL]; @@ -133,14 +133,14 @@ message CreateBasicReportRequest { } ]; - // The ID to use for the Basic Report, which will become the final component - // of the Basic Report's resource name. + // The ID to use for the BasicReport, which will become the final component + // of the BasicReport's resource name. // // This must conform to RFC 1034, with the additional restriction that all // letters must be lower-case. - string page_template_id = 2 [(google.api.field_behavior) = REQUIRED]; + string basic_report_id = 2 [(google.api.field_behavior) = REQUIRED]; - // The Basic Report to create. + // The BasicReport to create. BasicReport basic_report = 3; // A unique identifier for this request. Restricted to 36 ASCII characters. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto index 81afb39a442..ba55781d5bd 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto @@ -118,7 +118,7 @@ message PageMetricSpec { // Metrics to be computed over the entire reporting_unit message ReportingUnitMetricSetSpec { - // Metrics for the union of the items in the reporting)unit + // Metrics for the union of the items in the reporting_unit BasicMetricSetSpec basic = 1 [(google.api.field_behavior) = IMMUTABLE]; // Compute a stacked incremental reach result for the reporting_unit @@ -127,11 +127,11 @@ message PageMetricSpec { // field is "rs1, rs2, rs3" then the following are reported: // 1. The reach of rs1 // 2. The incremental reach of (rs1+rs2) over rs1 - // (i.e. the unique contribution of rs2 with respect to rs2) + // (i.e. the unique contribution of rs2 with respect to rs1) // 3. The incremental reach of (rs1+rs2+rs3) over (rs1+rs2) // (i.e. the unique contribution of rs3 with respect to rs1 and rs2. // - // In the case a output for a category of components is desired, this + // In the case an output for a category of components is desired, this // can be achieved by first grouping the components by category. Then // once the output is provided the reach values for the components in the // category can be summed. @@ -150,51 +150,44 @@ message PageMetricSpec { // The set of metrics to compute for the entire reporting_unit ReportingUnitMetricSetSpec reporting_unit = 2; - // Compute metrics that apply to each unit of the reporting_unit_spec - // with respect to all others. + // Metrics for each component of the reporting_unit message ComponentMetricSetSpec { - // The basic metrics for each ReportingUnit.unit + // Basic metrics for each item in reporting_unit.components BasicMetricSetSpec basic = 1 [(google.api.field_behavior) = IMMUTABLE]; - // Compute the unique reach of each reporting unit in the - // reporting_unit_spec with respect to all other reporting units. - // - // For example if reporting_sets=[RS1, RS2, RS3] the unique reach of - // RS1, RS2, and RS3 are computed. - // - // It is an error to specify this if only a single reporting unit is - // specified since it is the same thing as requesting union.reach. + // The unique reach of each item in reporting_unit.components + // with respect to all other components bool unique_reach = 2 [(google.api.field_behavior) = IMMUTABLE]; } - // If reporting_unit.component is of size 1 the metrics computed for the - // component are identical to those computed for the union. Specifying this - // value is not recommended in this case. + // If reporting_unit.components is of size 1 the metrics computed for the + // component are identical to those computed for the entire reporting_unit. + // Specifying this value is not recommended in that case. ComponentMetricSetSpec component = 3 [(google.api.field_behavior) = IMMUTABLE]; - // Request overlaps (i.e. intersections) of the various combinations - // of reporting_unit components + // Metrics for the intersections (aka overlaps) of the n-way combinations + // of reporting_unit.components message ComponentIntersectionMetricSetSpec { // The number of components that contribute to the intersection. // // For example, a value of 2 will provide all 2-way intersections of - // the reporting_unit_spec. A value of 2 and 3 will provide both the + // the reporting_unit.components A value of 2 and 3 will provide both the // 2 and 3 way intersections. // - // The max value is the number of distrinct reporting - // units in the reporting_unit + // The minimum value is one and the the max value is the number of + // distinct reporting units in reporting_unit.components repeated int32 contributor_count = 1 [ (google.api.field_behavior) = IMMUTABLE, (google.api.field_behavior) = REQUIRED ]; - // The set of metrics to be computed for each intersection + // Metrics for each intersection BasicMetricSetSpec basic = 2 [ (google.api.field_behavior) = IMMUTABLE, (google.api.field_behavior) = REQUIRED ]; } - // Compute n-way intersections + // Metrics for n-way intersections ComponentIntersectionMetricSetSpec component_intersection = 4 [(google.api.field_behavior) = IMMUTABLE]; } From fa704e7a4d6d1889c2adb90d44d8a3dcb3fb9d03 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Mon, 13 Jan 2025 21:21:44 +0000 Subject: [PATCH 31/52] some lint + review comments --- .../proto/wfa/measurement/reporting/v2alpha/BUILD.bazel | 1 + .../reporting/v2alpha/basic_reports_service.proto | 9 ++++++--- .../proto/wfa/measurement/reporting/v2alpha/page.proto | 7 ++++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel index 8508cd06fde..d7f3d083ee3 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel @@ -378,6 +378,7 @@ proto_library( "@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:field_info_proto", "@com_google_googleapis//google/api:resource_proto", "@com_google_googleapis//google/longrunning:operations_proto", "@com_google_protobuf//:timestamp_proto", diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto index 8b7dd6530d0..c261386a014 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto @@ -19,6 +19,7 @@ package wfa.measurement.reporting.v2alpha; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; import "google/api/resource.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/timestamp.proto"; @@ -37,7 +38,7 @@ service BasicReports { post: "/v2alpha/{parent=measurementConsumers/*}/basicReports" body: "basicReport" }; - option (google.api.method_signature) = "parent,basicReport"; + option (google.api.method_signature) = "parent,basic_report,basic_report_id"; } // Returns the `BasicReport` with the given resource key. @@ -141,10 +142,12 @@ message CreateBasicReportRequest { string basic_report_id = 2 [(google.api.field_behavior) = REQUIRED]; // The BasicReport to create. - BasicReport basic_report = 3; + BasicReport basic_report = 3 [(google.api.field_behavior) = REQUIRED]; // A unique identifier for this request. Restricted to 36 ASCII characters. // A random UUID is recommended. // This request is only idempotent if a `request_id` is provided. - string request_id = 4; + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL]; } diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto index ba55781d5bd..51f896b4cc5 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto @@ -87,9 +87,10 @@ message PageMetricSpec { // filters that are associated with calculation spec is reported. bool population_size = 1 [(google.api.field_behavior) = IMMUTABLE]; - // The set of basic metrics that can be computed for any aspect of the - // reporting_unit (e.g. the whole thing, a single component, intersections, - // etc.) + // Specifies the set of basic metrics that can be computed for any aspect of + // the reporting_unit (e.g. the whole thing, a single component, intersections, + // etc.). Each element specifies that a particular metric should be included + // in the report output. message BasicMetricSetSpec { // The reach bool reach = 1 [(google.api.field_behavior) = IMMUTABLE]; From 90bb3e3b08ed84d87ef1ec7b567d7bec7c2c146e Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Tue, 14 Jan 2025 00:34:56 +0000 Subject: [PATCH 32/52] lint and format --- .../v2alpha/basic_reports_service.proto | 18 ++++++++++++---- .../measurement/reporting/v2alpha/page.proto | 21 +++++++++++-------- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto index c261386a014..95d28128cd9 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto @@ -36,9 +36,14 @@ service BasicReports { returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2alpha/{parent=measurementConsumers/*}/basicReports" - body: "basicReport" + body: "basic_report" }; - option (google.api.method_signature) = "parent,basic_report,basic_report_id"; + option (google.longrunning.operation_info) = { + response_type: "BasicReport" + metadata_type: "CreateBasicReportOperationMetadata" + }; + option (google.api.method_signature) = + "parent,basic_report,basic_report_id"; } // Returns the `BasicReport` with the given resource key. @@ -148,6 +153,11 @@ message CreateBasicReportRequest { // A random UUID is recommended. // This request is only idempotent if a `request_id` is provided. string request_id = 4 [ - (google.api.field_info).format = UUID4, - (google.api.field_behavior) = OPTIONAL]; + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; } + +// Operation metadata message for `CreateBasicReport` +// TODO(@kungfucraig): Additional details to be provided as the design matures. +message CreateBasicReportOperationMetadata {} diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto index 51f896b4cc5..1f22f81a74e 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto @@ -88,9 +88,9 @@ message PageMetricSpec { bool population_size = 1 [(google.api.field_behavior) = IMMUTABLE]; // Specifies the set of basic metrics that can be computed for any aspect of - // the reporting_unit (e.g. the whole thing, a single component, intersections, - // etc.). Each element specifies that a particular metric should be included - // in the report output. + // the reporting_unit (e.g. the whole thing, a single component, + // intersections, etc.). Each element specifies that a particular metric + // should be included in the report output. message BasicMetricSetSpec { // The reach bool reach = 1 [(google.api.field_behavior) = IMMUTABLE]; @@ -146,11 +146,12 @@ message PageMetricSpec { // and EDP3 and the second element is the incremental reach of EDP1 // with respect to them. Note that it would also be okay to specify // the components as [EDP3, EDP2, EDP1]. - bool stacked_incremental_reach = 2; + bool stacked_incremental_reach = 2 + [(google.api.field_behavior) = IMMUTABLE]; } // The set of metrics to compute for the entire reporting_unit - ReportingUnitMetricSetSpec reporting_unit = 2; - + ReportingUnitMetricSetSpec reporting_unit = 2 + [(google.api.field_behavior) = IMMUTABLE]; // Metrics for each component of the reporting_unit message ComponentMetricSetSpec { // Basic metrics for each item in reporting_unit.components @@ -339,10 +340,12 @@ message Page { // 1. reach(rs1) // 2. reach(rs1+rs2) - reach(rs1) // 3. reach(rs1+rs2+rs3) - reach(rs1+rs2) - repeated int32 stacked_incremental_reach = 2; + repeated int32 stacked_incremental_reach = 2 + [(google.api.field_behavior) = IMMUTABLE]; } // Metrics for the whole reporting_unit - ReportingUnitMetricSet reporting_unit = 2; + ReportingUnitMetricSet reporting_unit = 2 + [(google.api.field_behavior) = IMMUTABLE]; // Metrics for a single component of the reporting_unit. message ComponentMetricSet { @@ -398,7 +401,7 @@ message Page { } // The set of results for the Page, one per impression qualification filter // that was applicable to the page. - repeated Result results = 2; + repeated Result results = 2 [(google.api.field_behavior) = IMMUTABLE]; } // The result for a single PageSpec From 5a3a609fe3f48a3dd924a8e13bfdbc33e8bc2539 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Tue, 14 Jan 2025 00:36:02 +0000 Subject: [PATCH 33/52] updated comment --- .../measurement/reporting/v2alpha/basic_reports_service.proto | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto index 95d28128cd9..c2a8cffa461 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto @@ -149,8 +149,7 @@ message CreateBasicReportRequest { // The BasicReport to create. BasicReport basic_report = 3 [(google.api.field_behavior) = REQUIRED]; - // A unique identifier for this request. Restricted to 36 ASCII characters. - // A random UUID is recommended. + // A unique identifier for this request. // This request is only idempotent if a `request_id` is provided. string request_id = 4 [ (google.api.field_info).format = UUID4, From 771c2f5ae565250ba1ee6ef815e8295f9e75f7aa Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Fri, 17 Jan 2025 23:51:00 +0000 Subject: [PATCH 34/52] builds after rebase --- .../measurement/reporting/v2alpha/BUILD.bazel | 31 ------------------- .../reporting/v2alpha/basic_report.proto | 2 +- .../impression_qualification_filter.proto | 8 ----- .../measurement/reporting/v2alpha/page.proto | 7 ----- 4 files changed, 1 insertion(+), 47 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel index d7f3d083ee3..ea0118c0216 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel @@ -109,37 +109,6 @@ kt_jvm_proto_library( deps = [":impression_qualification_filter_spec_proto"], ) -proto_library( - name = "media_type_proto", - srcs = ["media_type.proto"], - strip_import_prefix = IMPORT_PREFIX, - deps = [ - ":reporting_common_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 = [ - "@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"], diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto index 01c927c0e67..a7924ffff83 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto @@ -76,7 +76,7 @@ message BasicReport { ]; // Specifies the Pages to create - repeated PageSpec page_specs = 8 [ + repeated PageSpec page_specs = 9 [ (google.api.field_behavior) = IMMUTABLE, (google.api.field_behavior) = REQUIRED ]; diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto index 934a526be15..6e400d78246 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto @@ -49,14 +49,6 @@ message ImpressionQualificationFilter { (google.api.field_behavior) = IMMUTABLE ]; - // Specifies the filter criteria for each MediaType. - // - // There may be at most one spec per MediaType. - repeated ImpressionQualificationFilterSpec filter_specs = 4 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; - // Specifies the filter criteria for each MediaType. // // They may be at most one spec per MediaType. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto index 1f22f81a74e..f7d47c55976 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto @@ -265,13 +265,6 @@ message Page { [(google.api.field_behavior) = IMMUTABLE]; } - // A summary of each component of the reporting_unit reported on - message ReportingUnitSummary { - // Component summaries - repeated ReportingUnitComponentSummary reporting_unit_component_summary = - 1 [(google.api.field_behavior) = IMMUTABLE]; - } - // A summary of each component of the reporting_unit reported on message ReportingUnitSummary { // Component summaries From 23d80fedc93473af7559f9afafdc8692e0c99020 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Fri, 17 Jan 2025 23:56:17 +0000 Subject: [PATCH 35/52] lint + typo --- .../reporting/v2alpha/impression_qualification_filter.proto | 2 +- src/main/proto/wfa/measurement/reporting/v2alpha/page.proto | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto index 6e400d78246..f5c9979f50a 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto @@ -51,7 +51,7 @@ message ImpressionQualificationFilter { // Specifies the filter criteria for each MediaType. // - // They may be at most one spec per MediaType. + // There may be at most one spec per MediaType. repeated ImpressionQualificationFilterSpec filter_specs = 4 [ (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto index f7d47c55976..3d47dd52265 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto @@ -290,6 +290,7 @@ message Page { repeated EventFilter filters = 2 [(google.api.field_behavior) = IMMUTABLE]; } + // Sumary of the grouping and filtering applied to the metrics DimensionSpecSummary dimension_spec_summary = 4 [(google.api.field_behavior) = IMMUTABLE]; From 09e32b6d47c65c10eb5fa9fc60ffab4c414fdf9e Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Fri, 17 Jan 2025 23:56:43 +0000 Subject: [PATCH 36/52] lint + typo --- src/main/proto/wfa/measurement/reporting/v2alpha/page.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto index 3d47dd52265..0290f63d356 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto @@ -290,7 +290,7 @@ message Page { repeated EventFilter filters = 2 [(google.api.field_behavior) = IMMUTABLE]; } - // Sumary of the grouping and filtering applied to the metrics + // Summary of the grouping and filtering applied to the metrics DimensionSpecSummary dimension_spec_summary = 4 [(google.api.field_behavior) = IMMUTABLE]; From a530c01c156534076c78bb2c020f59a6161de871 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Sun, 15 Dec 2024 22:51:06 +0000 Subject: [PATCH 37/52] substantial changes --- .../measurement/reporting/v2alpha/BUILD.bazel | 6 +- .../reporting/v2alpha/advanced_report.proto | 0 .../reporting/v2alpha/media_type.proto | 34 ---- .../reporting/v2alpha/reporting_common.proto | 150 ++++++++++++++++++ 4 files changed, 152 insertions(+), 38 deletions(-) create mode 100644 src/main/proto/wfa/measurement/reporting/v2alpha/advanced_report.proto delete mode 100644 src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto create mode 100644 src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel index ea0118c0216..3ef4e56dffd 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel @@ -113,13 +113,11 @@ 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"], + name = "impression_qualification_filter_kt_jvm_proto", + deps = [":impression_qualification_filter_proto"], ) proto_library( diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/advanced_report.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/advanced_report.proto new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto deleted file mode 100644 index 9134578efca..00000000000 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto +++ /dev/null @@ -1,34 +0,0 @@ -// 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; - -option java_package = "org.wfanet.measurement.reporting.v2alpha"; -option java_multiple_files = true; -option java_outer_classname = "MediaTypeProto"; - -// MediaType is used to designate how various artifacts -// should be interpreted for reporting. -enum MediaType { - // Default value. Unused. - MEDIA_TYPE_UNSPECIFIED = 0; - // Interpret a set of artifacts as Video - VIDEO = 1; - // Interpret a set of artifacts as Display - DISPLAY = 2; - // Interpret as set of artifacts as Other - OTHER = 3; -} diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto new file mode 100644 index 00000000000..00de45f71c3 --- /dev/null +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto @@ -0,0 +1,150 @@ +// 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"; + +option java_package = "org.wfanet.measurement.reporting.v2alpha"; +option java_multiple_files = true; +option java_outer_classname = "ReportingCommonProto"; + +// ReportingMediaType is used to designate how reporting artifacts +// should be interpreted for reporting. This designation could apply +// to EventGroups ReportingSets, filters, and more. Henceforth these are +// call artifacts. +// +// For example, the ReportingMediaType determines what MeasurementPolicy and +// filters to apply to the arifacts within a particular Report. +enum ReportingMediaType { + // Default value. Unused. + MEDIA_TYPE_UNSPECIFIED = 0; + // Interpret a set of arifacts as Cross Media + CROSS_MEDIA = 1; + // Interpret a set of arifacts as Video + VIDEO = 2; + // Interpret a set of arifacts as Display + DISPLAY = 3; + // Interpret as set of artifacts as Other + OTHER = 4; +} + +// The type of the unit being reported on +enum ReportingUnitType { + // Default value. Unused. + REPORTING_TYPE_UNSPECIFIED = 0; + // The artifact used by the reporting unit is a halo.wfanet.org/DataProvider + DATA_PROVIDER = 1; + // The artifact used by the reporting unit is a halo.wfanet.org/ReportingSet + // Phase III + // REPORTING_SET = 2; +} + +// Specifies the units to report on. +message ReportingUnit { + ReportingUnitType reporting_unit_type = 1; + + // A list of resources to report on. + // + // These names must have the type specified by the reporting unit type. + repeated string components = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { type: "*" } + ]; + + // Display names of the resource referendced by the Reporting Unit + repeated string display_name = 3 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IMMUTABLE + ]; + + // The Reporting Media Type to use when reporting on this Reporting Unit. + // + // Within a report this option determines which set of filters to apply. + // Impressions associated with the reporting units that do not correspond + // to the provided Reporting Media Type will be filtered out. + // If CROSS_MEDIA is specified all impressions are included. + ReportingMediaType reporting_media_type = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; +} + +// Specifies the impression filter for a ReportingMediaType. +// +// If particular filter values are not applicable to the media they +// are applied to it is an error (e.g. DISPLAY cannot be filtered by +// percent completion) +message ImpressionQualificationFilterSpec { + // The ReportingMediaType this filter applies to. + ReportingMediaType media_type = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Specifies a quantile + enum Quantile { + QUANTILE_UNSPECIFIED = 0; + // 0th percentile + ZERO = 1; + // 25th percentile + TWENTY_FIVE = 2; + // 50th percentile + FIFTY = 3; + // 75th percentile + SEVENTY_FIVE = 4; + // 100th percentile + ONE_HUNDRED = 5; + } + + // Specify a percent as a fraction or as a quantile + message Percent { + oneof value { + // The fraction + float fraction = 1 [(google.api.field_behavior) = IMMUTABLE]; + // The quantile + Quantile quantile = 2 [(google.api.field_behavior) = IMMUTABLE]; + } + } + + // Specifies the viewpability filter + Percent viewability = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + // Specifies the completion filter + Percent completion = 3 [(google.api.field_behavior) = IMMUTABLE]; +} + +// An impression qualification filter for reporting that allows either a named +// filter or a custom filter. +message ReportingImpressionQualificationFilter { + oneof filter { + // The resource name of an ImpressionQualificstionFilter. + // (e.g. "video/mrc") + string impression_qualification_filter = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "reporting.halo-cmm.org/ImpressionQualificationFilter" + } + ]; + // A custom filter + ImpressionQualificationFilterSpec custom = 2 + [(google.api.field_behavior) = IMMUTABLE]; + } +} From b443a7877636edc3f3e7ddcc42bcb04aa67c7488 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Sun, 15 Dec 2024 22:53:18 +0000 Subject: [PATCH 38/52] build update --- src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel index 3ef4e56dffd..57237f96a14 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel @@ -113,6 +113,11 @@ proto_library( name = "media_type_proto", srcs = ["media_type.proto"], strip_import_prefix = IMPORT_PREFIX, + deps = [ + ":reporting_common_proto", + "@com_google_googleapis//google/api:field_behavior_proto", + "@com_google_googleapis//google/api:resource_proto", + ], ) kt_jvm_proto_library( From 382e3271edf7b058859c2aca21a52f3d40cb23bf Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Mon, 16 Dec 2024 18:00:09 +0000 Subject: [PATCH 39/52] Api lint --- .../reporting/v2alpha/reporting_common.proto | 63 ++++++++++--------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto index 00de45f71c3..c3287df9458 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto @@ -23,39 +23,9 @@ option java_package = "org.wfanet.measurement.reporting.v2alpha"; option java_multiple_files = true; option java_outer_classname = "ReportingCommonProto"; -// ReportingMediaType is used to designate how reporting artifacts -// should be interpreted for reporting. This designation could apply -// to EventGroups ReportingSets, filters, and more. Henceforth these are -// call artifacts. -// -// For example, the ReportingMediaType determines what MeasurementPolicy and -// filters to apply to the arifacts within a particular Report. -enum ReportingMediaType { - // Default value. Unused. - MEDIA_TYPE_UNSPECIFIED = 0; - // Interpret a set of arifacts as Cross Media - CROSS_MEDIA = 1; - // Interpret a set of arifacts as Video - VIDEO = 2; - // Interpret a set of arifacts as Display - DISPLAY = 3; - // Interpret as set of artifacts as Other - OTHER = 4; -} - -// The type of the unit being reported on -enum ReportingUnitType { - // Default value. Unused. - REPORTING_TYPE_UNSPECIFIED = 0; - // The artifact used by the reporting unit is a halo.wfanet.org/DataProvider - DATA_PROVIDER = 1; - // The artifact used by the reporting unit is a halo.wfanet.org/ReportingSet - // Phase III - // REPORTING_SET = 2; -} - // Specifies the units to report on. message ReportingUnit { + // The type of the reporting unit ReportingUnitType reporting_unit_type = 1; // A list of resources to report on. @@ -99,6 +69,7 @@ message ImpressionQualificationFilterSpec { // Specifies a quantile enum Quantile { + // Default value. Unused. QUANTILE_UNSPECIFIED = 0; // 0th percentile ZERO = 1; @@ -148,3 +119,33 @@ message ReportingImpressionQualificationFilter { [(google.api.field_behavior) = IMMUTABLE]; } } + +// ReportingMediaType is used to designate how reporting artifacts +// should be interpreted for reporting. This designation could apply +// to EventGroups ReportingSets, filters, and more. Henceforth these are +// call artifacts. +// +// For example, the ReportingMediaType determines what MeasurementPolicy and +// filters to apply to the arifacts within a particular Report. +enum ReportingMediaType { + // Default value. Unused. + REPORTING_MEDIA_TYPE_UNSPECIFIED = 0; + // Interpret a set of arifacts as Cross Media + CROSS_MEDIA = 1; + // Interpret a set of arifacts as Video + VIDEO = 2; + // Interpret a set of arifacts as Display + DISPLAY = 3; + // Interpret as set of artifacts as Other + OTHER = 4; +} + +// The type of the unit being reported on +// +// TODO(@kungfucraig) Introduce REPORTING_SET for Phase III +enum ReportingUnitType { + // Default value. Unused. + REPORTING_UNIT_TYPE_UNSPECIFIED = 0; + // The artifact used by the reporting unit is a halo.wfanet.org/DataProvider + DATA_PROVIDER = 1; +} From 2d4e9c777d625ef595dd17c660dcf5b8c5edd81b Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Mon, 16 Dec 2024 18:08:56 +0000 Subject: [PATCH 40/52] format + made reporting media types plural --- .../reporting/v2alpha/reporting_common.proto | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto index c3287df9458..bd5c2baf5a1 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto @@ -47,9 +47,15 @@ message ReportingUnit { // // Within a report this option determines which set of filters to apply. // Impressions associated with the reporting units that do not correspond - // to the provided Reporting Media Type will be filtered out. + // to the provided Reporting Media Types will be filtered out. // If CROSS_MEDIA is specified all impressions are included. - ReportingMediaType reporting_media_type = 4 [ + // + // If multiple values are specified then the set of filters that are + // applicable to all of them are used. For example if VIDEO + // and DISPLAY are specified and an MRC filter is available for both + // then the MRC filter, as it applies to the specific media type, + // is applied. + repeated ReportingMediaType reporting_media_types = 4 [ (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE ]; @@ -107,7 +113,7 @@ message ImpressionQualificationFilterSpec { message ReportingImpressionQualificationFilter { oneof filter { // The resource name of an ImpressionQualificstionFilter. - // (e.g. "video/mrc") + // (e.g. "mrc") string impression_qualification_filter = 1 [ (google.api.field_behavior) = IMMUTABLE, (google.api.resource_reference) = { From 3ff8dbe9a43de9e5fa2bccc34ba9d253deda973d Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Tue, 17 Dec 2024 01:14:14 +0000 Subject: [PATCH 41/52] updated from review --- .../measurement/reporting/v2alpha/BUILD.bazel | 14 ++ .../reporting/v2alpha/reporting_common.proto | 157 ------------------ 2 files changed, 14 insertions(+), 157 deletions(-) delete mode 100644 src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel index 57237f96a14..22fdf51fb24 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel @@ -125,6 +125,20 @@ kt_jvm_proto_library( 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 = [ + "@com_google_googleapis//google/api:field_behavior_proto", + ], +) + +kt_jvm_proto_library( + name = "impression_qualification_filter_spec_kt_jvm_proto", + deps = [":impression_qualification_filter_spec_proto"], +) + proto_library( name = "metric_proto", srcs = ["metric.proto"], diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto deleted file mode 100644 index bd5c2baf5a1..00000000000 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_common.proto +++ /dev/null @@ -1,157 +0,0 @@ -// 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"; - -option java_package = "org.wfanet.measurement.reporting.v2alpha"; -option java_multiple_files = true; -option java_outer_classname = "ReportingCommonProto"; - -// Specifies the units to report on. -message ReportingUnit { - // The type of the reporting unit - ReportingUnitType reporting_unit_type = 1; - - // A list of resources to report on. - // - // These names must have the type specified by the reporting unit type. - repeated string components = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE, - (google.api.resource_reference) = { type: "*" } - ]; - - // Display names of the resource referendced by the Reporting Unit - repeated string display_name = 3 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.field_behavior) = IMMUTABLE - ]; - - // The Reporting Media Type to use when reporting on this Reporting Unit. - // - // Within a report this option determines which set of filters to apply. - // Impressions associated with the reporting units that do not correspond - // to the provided Reporting Media Types will be filtered out. - // If CROSS_MEDIA is specified all impressions are included. - // - // If multiple values are specified then the set of filters that are - // applicable to all of them are used. For example if VIDEO - // and DISPLAY are specified and an MRC filter is available for both - // then the MRC filter, as it applies to the specific media type, - // is applied. - repeated ReportingMediaType reporting_media_types = 4 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; -} - -// Specifies the impression filter for a ReportingMediaType. -// -// If particular filter values are not applicable to the media they -// are applied to it is an error (e.g. DISPLAY cannot be filtered by -// percent completion) -message ImpressionQualificationFilterSpec { - // The ReportingMediaType this filter applies to. - ReportingMediaType media_type = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; - - // Specifies a quantile - enum Quantile { - // Default value. Unused. - QUANTILE_UNSPECIFIED = 0; - // 0th percentile - ZERO = 1; - // 25th percentile - TWENTY_FIVE = 2; - // 50th percentile - FIFTY = 3; - // 75th percentile - SEVENTY_FIVE = 4; - // 100th percentile - ONE_HUNDRED = 5; - } - - // Specify a percent as a fraction or as a quantile - message Percent { - oneof value { - // The fraction - float fraction = 1 [(google.api.field_behavior) = IMMUTABLE]; - // The quantile - Quantile quantile = 2 [(google.api.field_behavior) = IMMUTABLE]; - } - } - - // Specifies the viewpability filter - Percent viewability = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; - // Specifies the completion filter - Percent completion = 3 [(google.api.field_behavior) = IMMUTABLE]; -} - -// An impression qualification filter for reporting that allows either a named -// filter or a custom filter. -message ReportingImpressionQualificationFilter { - oneof filter { - // The resource name of an ImpressionQualificstionFilter. - // (e.g. "mrc") - string impression_qualification_filter = 1 [ - (google.api.field_behavior) = IMMUTABLE, - (google.api.resource_reference) = { - type: "reporting.halo-cmm.org/ImpressionQualificationFilter" - } - ]; - // A custom filter - ImpressionQualificationFilterSpec custom = 2 - [(google.api.field_behavior) = IMMUTABLE]; - } -} - -// ReportingMediaType is used to designate how reporting artifacts -// should be interpreted for reporting. This designation could apply -// to EventGroups ReportingSets, filters, and more. Henceforth these are -// call artifacts. -// -// For example, the ReportingMediaType determines what MeasurementPolicy and -// filters to apply to the arifacts within a particular Report. -enum ReportingMediaType { - // Default value. Unused. - REPORTING_MEDIA_TYPE_UNSPECIFIED = 0; - // Interpret a set of arifacts as Cross Media - CROSS_MEDIA = 1; - // Interpret a set of arifacts as Video - VIDEO = 2; - // Interpret a set of arifacts as Display - DISPLAY = 3; - // Interpret as set of artifacts as Other - OTHER = 4; -} - -// The type of the unit being reported on -// -// TODO(@kungfucraig) Introduce REPORTING_SET for Phase III -enum ReportingUnitType { - // Default value. Unused. - REPORTING_UNIT_TYPE_UNSPECIFIED = 0; - // The artifact used by the reporting unit is a halo.wfanet.org/DataProvider - DATA_PROVIDER = 1; -} From 927b7410134ede86cd3497186d9863f3a7071f63 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Wed, 18 Dec 2024 00:30:27 +0000 Subject: [PATCH 42/52] added impression qualification server, lint errors, review comments --- .../proto/wfa/measurement/reporting/v2alpha/BUILD.bazel | 1 + .../v2alpha/impression_qualification_filter.proto | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel index 22fdf51fb24..92f21eec981 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel @@ -131,6 +131,7 @@ proto_library( strip_import_prefix = IMPORT_PREFIX, deps = [ "@com_google_googleapis//google/api:field_behavior_proto", + "@com_google_protobuf//:duration_proto", ], ) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto index f5c9979f50a..5298964c17e 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto @@ -56,4 +56,12 @@ message ImpressionQualificationFilter { (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE ]; + + // The filter category (e.g. MRC) + // + // This allows filters to be grouped by category across Filter Types + string category = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = IMMUTABLE + ]; } From 2e18bffe10a0f90d34f0e2fa99a290295627715c Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Thu, 2 Jan 2025 19:48:26 +0000 Subject: [PATCH 43/52] update from advanced report work --- .../measurement/reporting/v2alpha/BUILD.bazel | 116 ++++++++++++++++++ .../impression_qualification_filter.proto | 8 +- .../reporting/v2alpha/media_type.proto | 34 +++++ .../reporting/v2alpha/reporting_unit.proto | 1 + 4 files changed, 155 insertions(+), 4 deletions(-) create mode 100644 src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel index 92f21eec981..22690ef9baa 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel @@ -13,11 +13,33 @@ IMPORT_PREFIX = "/src/main/proto" # Resources and shared message types. +proto_library( + name = "advanced_report_proto", + srcs = ["advanced_report.proto"], + strip_import_prefix = IMPORT_PREFIX, + deps = [ + ":media_type_proto", + ":metric_frequency_spec_proto", + ":reporting_interval_proto", + ":reporting_impression_qualification_filter_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_protobuf//:timestamp_proto", + ], +) + +kt_jvm_proto_library( + name = "advanced_report_kt_jvm_proto", + deps = [":advanced_report_proto"], +) + 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", @@ -140,6 +162,19 @@ kt_jvm_proto_library( 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"], @@ -284,6 +319,7 @@ proto_library( 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", ], @@ -319,6 +355,25 @@ proto_library( ], ) +proto_library( + name = "operation_proto", + srcs = ["operation.proto"], + strip_import_prefix = IMPORT_PREFIX, + deps = [ + "@com_google_googleapis//google/api:field_behavior_proto", + "@com_google_googleapis//google/api:resource_proto", + "@com_google_googleapis//google/type:date_proto", + "@com_google_googleapis//google/type:datetime_proto", + "@com_google_googleapis//google/type:dayofweek_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +kt_jvm_proto_library( + name = "operation_kt_jvm_proto", + deps = [":operation_proto"], +) + proto_library( name = "page_proto", srcs = ["page.proto"], @@ -342,6 +397,22 @@ kt_jvm_proto_library( deps = [":page_proto"], ) +proto_library( + name = "page_template_proto", + srcs = ["page_template.proto"], + strip_import_prefix = IMPORT_PREFIX, + deps = [ + ":page_proto", + "@com_google_googleapis//google/api:field_behavior_proto", + "@com_google_googleapis//google/api:resource_proto", + ], +) + +kt_jvm_proto_library( + name = "page_template_kt_jvm_proto", + deps = [":page_template_proto"], +) + proto_library( name = "page_token_proto", srcs = ["page_token.proto"], @@ -356,6 +427,30 @@ kt_jvm_proto_library( ) # Services. +proto_library( + name = "advanced_reports_service_proto", + srcs = ["advanced_reports_service.proto"], + strip_import_prefix = IMPORT_PREFIX, + deps = [ + ":advanced_report_proto", + ":operation_proto", + ":page_proto", + ":reporting_interval_proto", + ":reporting_unit_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//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +kt_jvm_grpc_proto_library( + name = "advanced_reports_service_kt_jvm_grpc_proto", + deps = [":advanced_reports_service_proto"], +) + proto_library( name = "basic_reports_service_proto", srcs = ["basic_reports_service.proto"], @@ -457,6 +552,27 @@ kt_jvm_grpc_proto_library( deps = ["@com_google_googleapis//google/longrunning:operations_proto",], ) +proto_library( + name = "page_templates_service_proto", + srcs = ["page_templates_service.proto"], + strip_import_prefix = IMPORT_PREFIX, + deps = [ + ":page_proto", + ":page_template_proto", + ":reporting_unit_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 = "page_templates_service_kt_jvm_grpc_proto", + deps = [":page_templates_service_proto"], +) + proto_library( name = "reports_service_proto", srcs = ["reports_service.proto"], diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto index 5298964c17e..934a526be15 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto @@ -57,11 +57,11 @@ message ImpressionQualificationFilter { (google.api.field_behavior) = IMMUTABLE ]; - // The filter category (e.g. MRC) + // Specifies the filter criteria for each MediaType. // - // This allows filters to be grouped by category across Filter Types - string category = 3 [ - (google.api.field_behavior) = OPTIONAL, + // They may be at most one spec per MediaType. + repeated ImpressionQualificationFilterSpec filter_specs = 4 [ + (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE ]; } diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto new file mode 100644 index 00000000000..3868ae7d986 --- /dev/null +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto @@ -0,0 +1,34 @@ +// 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; + +option java_package = "org.wfanet.measurement.reporting.v2alpha"; +option java_multiple_files = true; +option java_outer_classname = "MediaTypeProto"; + +// MediaType is used to designate how reporting artifacts +// should be interpreted for reporting. +enum MediaType { + // Default value. Unused. + MEDIA_TYPE_UNSPECIFIED = 0; + // Interpret a set of arifacts as Video + VIDEO = 1; + // Interpret a set of arifacts as Display + DISPLAY = 2; + // Interpret as set of artifacts as Other + OTHER = 3; +} diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_unit.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_unit.proto index 13c9410e5e7..67667048cca 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_unit.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_unit.proto @@ -18,6 +18,7 @@ package wfa.measurement.reporting.v2alpha; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "wfa/measurement/reporting/v2alpha/media_type.proto"; option java_package = "org.wfanet.measurement.reporting.v2alpha"; option java_multiple_files = true; From 7e3e3ec06474ef5361479c1ba76ef3827e03d286 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Thu, 2 Jan 2025 20:38:45 +0000 Subject: [PATCH 44/52] more from my review --- ...ting_impression_qualification_filter.proto | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_impression_qualification_filter.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_impression_qualification_filter.proto index 18d750226ed..642c68b068b 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_impression_qualification_filter.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_impression_qualification_filter.proto @@ -26,6 +26,26 @@ option java_outer_classname = "ReportingImpressionQualificationFilterProto"; // An impression qualification filter for reporting that allows either a named // filter or a custom filter. +// +// A filter can apply to one or more Media Types, and it is applied +// to each reporting unit (i.e. the containeres of EventGroups - +// ReportingSet or CampaignGroup) under the following conditions: +// 1. Within the scope of a Report, the Media Type(s) of a reporting unit +// are defined as the intersection of the reporting unit's actual Media +// Types and the report's Media Type filters. This is called the scoped +// Media Type. For exmaple, if the Event Gruops of the reporting +// unit have MediaType=[VIDEO, DISPLAY] and the report has a +// MediaType filter = [VIDEO], then the scoped Media Type of the +// reporting unit is VIDEO. +// 2. If the scoped Media Type of a reporting unit intersects the Media +// Types of a filter catetory then the scoped Media Types of the +// reporting unit must be equal to or a proper subset of this filter's +// MediaTypes. Otherwise, if there is an intersection it is an error. +// This is to avoid omitting impressions that might otherwise be +// expected to be counted. +// 3. If the scoped Media Type of a reporting unit does not intersect with +// the filter's MediaTypes then the metrics computed using that filter +// do not include that Reporting Set. message ReportingImpressionQualificationFilter { // The custom filter criteria for one or more MediaTypes message CustomImpressionQualificationFilterSpec { From 650e4e7b4903f7051d94ba66ddb2945c93ef0800 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Tue, 7 Jan 2025 17:28:25 +0000 Subject: [PATCH 45/52] updated tags --- .../proto/wfa/measurement/reporting/v2alpha/basic_report.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto index a7924ffff83..6bf0ee87503 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto @@ -70,7 +70,7 @@ message BasicReport { // The custom criteria and any specific impression_qualification_filter may // each be used at most once. repeated ReportingImpressionQualificationFilter - impression_qualification_filters = 6 [ + impression_qualification_filters = 5 [ (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE ]; From 040a95dc04afe883241a89ece82ec33589eb23bb Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Tue, 7 Jan 2025 19:04:57 +0000 Subject: [PATCH 46/52] Moved event filter into its own file and used it to define IQF. --- .../wfa/measurement/reporting/v2alpha/BUILD.bazel | 10 +++++----- .../measurement/reporting/v2alpha/basic_report.proto | 2 +- .../v2alpha/impression_qualification_filter_spec.proto | 2 +- .../proto/wfa/measurement/reporting/v2alpha/page.proto | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel index 22690ef9baa..494a79ef2d7 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel @@ -282,6 +282,11 @@ kt_jvm_proto_library( deps = [":report_schedule_iteration_proto"], ) +kt_jvm_proto_library( + name = "reporting_impression_qualification_filter_kt_jvm_proto", + deps = [":reporting_impression_qualification_filter_proto"], +) + proto_library( name = "reporting_impression_qualification_filter_proto", srcs = ["reporting_impression_qualification_filter.proto"], @@ -293,11 +298,6 @@ proto_library( ], ) -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"], diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto index 6bf0ee87503..1241bdd7e67 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto @@ -1,4 +1,4 @@ -// Copyright 2024 The Cross-Media Measurement Authors +// Copyright 2025 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. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter_spec.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter_spec.proto index 1607221bfba..9f4f48be2a1 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter_spec.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter_spec.proto @@ -1,4 +1,4 @@ -// Copyright 2024 The Cross-Media Measurement Authors +// Copyright 2025 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. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto index 0290f63d356..730bfdf6226 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto @@ -1,4 +1,4 @@ -// Copyright 2024 The Cross-Media Measurement Authors +// Copyright 2025 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. From 0688b16b8966eddb5f3a660126d7ac5878599449 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Wed, 8 Jan 2025 01:24:49 +0000 Subject: [PATCH 47/52] update page --- .../v2alpha/basic_reports_service.proto | 2 +- .../impression_qualification_filter.proto | 2 +- ...ession_qualification_filters_service.proto | 2 +- .../reporting/v2alpha/media_type.proto | 4 ++-- .../v2alpha/metric_frequency_spec.proto | 2 +- ...ting_impression_qualification_filter.proto | 20 ------------------- 6 files changed, 6 insertions(+), 26 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto index c2a8cffa461..3d6a682293c 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto @@ -1,4 +1,4 @@ -// Copyright 2024 The Cross-Media Measurement Authors +// Copyright 2025 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. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto index 934a526be15..1d0d6770f79 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto @@ -1,4 +1,4 @@ -// Copyright 2024 The Cross-Media Measurement Authors +// Copyright 2025 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. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filters_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filters_service.proto index b15b795e26d..7f495a468d2 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filters_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filters_service.proto @@ -1,4 +1,4 @@ -// Copyright 2024 The Cross-Media Measurement Authors +// Copyright 2025 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. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto index 3868ae7d986..a96a96a7373 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto @@ -1,4 +1,4 @@ -// Copyright 2024 The Cross-Media Measurement Authors +// Copyright 2025 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. @@ -20,7 +20,7 @@ option java_package = "org.wfanet.measurement.reporting.v2alpha"; option java_multiple_files = true; option java_outer_classname = "MediaTypeProto"; -// MediaType is used to designate how reporting artifacts +// MediaType is used to designate how various artifacts // should be interpreted for reporting. enum MediaType { // Default value. Unused. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/metric_frequency_spec.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/metric_frequency_spec.proto index 6c6a9f9a683..7eb6c5ef313 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/metric_frequency_spec.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/metric_frequency_spec.proto @@ -1,4 +1,4 @@ -// Copyright 2024 The Cross-Media Measurement Authors +// Copyright 2025 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. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_impression_qualification_filter.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_impression_qualification_filter.proto index 642c68b068b..18d750226ed 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_impression_qualification_filter.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_impression_qualification_filter.proto @@ -26,26 +26,6 @@ option java_outer_classname = "ReportingImpressionQualificationFilterProto"; // An impression qualification filter for reporting that allows either a named // filter or a custom filter. -// -// A filter can apply to one or more Media Types, and it is applied -// to each reporting unit (i.e. the containeres of EventGroups - -// ReportingSet or CampaignGroup) under the following conditions: -// 1. Within the scope of a Report, the Media Type(s) of a reporting unit -// are defined as the intersection of the reporting unit's actual Media -// Types and the report's Media Type filters. This is called the scoped -// Media Type. For exmaple, if the Event Gruops of the reporting -// unit have MediaType=[VIDEO, DISPLAY] and the report has a -// MediaType filter = [VIDEO], then the scoped Media Type of the -// reporting unit is VIDEO. -// 2. If the scoped Media Type of a reporting unit intersects the Media -// Types of a filter catetory then the scoped Media Types of the -// reporting unit must be equal to or a proper subset of this filter's -// MediaTypes. Otherwise, if there is an intersection it is an error. -// This is to avoid omitting impressions that might otherwise be -// expected to be counted. -// 3. If the scoped Media Type of a reporting unit does not intersect with -// the filter's MediaTypes then the metrics computed using that filter -// do not include that Reporting Set. message ReportingImpressionQualificationFilter { // The custom filter criteria for one or more MediaTypes message CustomImpressionQualificationFilterSpec { From 832f606d9b5086bfced47e03c3a48bdd055bd4a3 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Thu, 9 Jan 2025 18:18:23 +0000 Subject: [PATCH 48/52] Update documentation and update ReportingUnit and its Summary --- .../proto/wfa/measurement/reporting/v2alpha/page.proto | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto index 730bfdf6226..48f9b5ae9d0 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto @@ -271,6 +271,14 @@ message Page { repeated ReportingUnitComponentSummary reporting_unit_component_summary = 1 [(google.api.field_behavior) = IMMUTABLE]; } + + // A summary of each component of the reporting_unit used to generate the + // Page + message ReportingUnitSummary { + // Component summaries + repeated ReportingUnitComponentSummary reporting_unit_component_summary = + 1 [(google.api.field_behavior) = IMMUTABLE]; + } // A summary of the ReportingUnit ReportingUnitSummary reporting_unit_summary = 1 [(google.api.field_behavior) = IMMUTABLE]; From 017647cd75663a2b2dde63f26533ab2ffd8ec4c4 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Thu, 9 Jan 2025 18:24:52 +0000 Subject: [PATCH 49/52] updated documentation --- src/main/proto/wfa/measurement/reporting/v2alpha/page.proto | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto index 48f9b5ae9d0..521136ccc70 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto @@ -272,8 +272,7 @@ message Page { 1 [(google.api.field_behavior) = IMMUTABLE]; } - // A summary of each component of the reporting_unit used to generate the - // Page + // A summary of each component of the reporting_unit reported on message ReportingUnitSummary { // Component summaries repeated ReportingUnitComponentSummary reporting_unit_component_summary = From a8737b192b9bc795ef681c1771c64b34a233c379 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Mon, 13 Jan 2025 20:16:32 +0000 Subject: [PATCH 50/52] updated copyright to be when files were first published --- .../proto/wfa/measurement/reporting/v2alpha/basic_report.proto | 2 +- .../measurement/reporting/v2alpha/basic_reports_service.proto | 2 +- .../reporting/v2alpha/impression_qualification_filter.proto | 2 +- .../v2alpha/impression_qualification_filter_spec.proto | 2 +- .../v2alpha/impression_qualification_filters_service.proto | 2 +- .../proto/wfa/measurement/reporting/v2alpha/media_type.proto | 2 +- .../measurement/reporting/v2alpha/metric_frequency_spec.proto | 2 +- src/main/proto/wfa/measurement/reporting/v2alpha/page.proto | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto index 1241bdd7e67..6bf0ee87503 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto @@ -1,4 +1,4 @@ -// Copyright 2025 The Cross-Media Measurement Authors +// 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. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto index 3d6a682293c..c2a8cffa461 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_reports_service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 The Cross-Media Measurement Authors +// 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. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto index 1d0d6770f79..934a526be15 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto @@ -1,4 +1,4 @@ -// Copyright 2025 The Cross-Media Measurement Authors +// 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. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter_spec.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter_spec.proto index 9f4f48be2a1..1607221bfba 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter_spec.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter_spec.proto @@ -1,4 +1,4 @@ -// Copyright 2025 The Cross-Media Measurement Authors +// 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. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filters_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filters_service.proto index 7f495a468d2..b15b795e26d 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filters_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filters_service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 The Cross-Media Measurement Authors +// 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. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto index a96a96a7373..710876c799d 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/media_type.proto @@ -1,4 +1,4 @@ -// Copyright 2025 The Cross-Media Measurement Authors +// 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. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/metric_frequency_spec.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/metric_frequency_spec.proto index 7eb6c5ef313..6c6a9f9a683 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/metric_frequency_spec.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/metric_frequency_spec.proto @@ -1,4 +1,4 @@ -// Copyright 2025 The Cross-Media Measurement Authors +// 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. diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto index 521136ccc70..a44147211d7 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto @@ -1,4 +1,4 @@ -// Copyright 2025 The Cross-Media Measurement Authors +// 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. From 8be88d7a0a9270e5816eb5a843258020f846cf49 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Wed, 8 Jan 2025 19:29:07 +0000 Subject: [PATCH 51/52] phase III --- .../measurement/reporting/v2alpha/BUILD.bazel | 1 + .../reporting/v2alpha/advanced_report.proto | 164 ++++++++++++ .../v2alpha/advanced_reports_service.proto | 250 ++++++++++++++++++ .../v2alpha/event_groups_service.proto | 2 +- ...impression_qualification_filter_spec.proto | 4 - .../metric_calculation_specs_service.proto | 2 +- .../reporting/v2alpha/metrics_service.proto | 2 +- .../reporting/v2alpha/operation.proto | 43 +++ .../measurement/reporting/v2alpha/page.proto | 163 ++++++++++-- .../reporting/v2alpha/page_template.proto | 65 +++++ .../v2alpha/page_templates_service.proto | 167 ++++++++++++ .../report_schedule_iterations_service.proto | 2 +- .../v2alpha/report_schedules_service.proto | 2 +- .../v2alpha/reporting_sets_service.proto | 2 +- .../reporting/v2alpha/reports_service.proto | 2 +- 15 files changed, 844 insertions(+), 27 deletions(-) create mode 100644 src/main/proto/wfa/measurement/reporting/v2alpha/advanced_reports_service.proto create mode 100644 src/main/proto/wfa/measurement/reporting/v2alpha/operation.proto create mode 100644 src/main/proto/wfa/measurement/reporting/v2alpha/page_template.proto create mode 100644 src/main/proto/wfa/measurement/reporting/v2alpha/page_templates_service.proto diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel index 494a79ef2d7..20f340edd0e 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel @@ -154,6 +154,7 @@ proto_library( deps = [ "@com_google_googleapis//google/api:field_behavior_proto", "@com_google_protobuf//:duration_proto", + "@com_google_googleapis//google/api:field_behavior_proto", ], ) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/advanced_report.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/advanced_report.proto index e69de29bb2d..ff910d522f2 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/advanced_report.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/advanced_report.proto @@ -0,0 +1,164 @@ +// 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/metric_frequency_spec.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 = "AdvancedReportProto"; + +// Resource representing a AdvancedReport. +// +// When an AdvancedReport is created a suite of metrics is precomputed. +// Once complete these are made available via the Query method. +message AdvancedReport { + option (google.api.resource) = { + type: "reporting.halo-cmm.org/AdvancedReport" + pattern: "measurementConsumers/{measurement_consumer}/advancedReports/{advanced_report}" + singular: "advancedReport" + plural: "advancedReports" + }; + + // Resource name. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Human readable title of the report. + string title = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OPTIONAL + ]; + + // The set of Reporting Sets for which the Advanced Report is + // created. + // + // The Reporting Sets must be either primitive or be a union of Reporting Sets + // that are either primitive or unions of other Reporting Sets. Filters may + // not be specified. + // + // Upon creation of the Advanced Report, any metric for any subset of these + // may be queried. + repeated string reporting_sets = 3 [ + (google.api.resource_reference) = { + type: "reporting.halo-cmm.org/ReportingSet" + }, + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // The interval that the Report spans + // + // The report_end is extended for live reports as new data + // becomes available. + ReportingInterval reporting_interval = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Specifies how to calculate precomputed report metrics + // + // This spec places limits on how the report can be queried after + // it is created. For example if the metric_frequency_specs only + // includes `total` then no metrics are computed for any subinterval of + // the report. + message CalculationSpec { + // The set of Media Types to report on. If empty report on all + // MediaTypes. + repeated MediaType media_types = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = UNORDERED_LIST + ]; + + // The set of impression qualification filters to be applied. + // + // Defaults are appended as the Measurement Policy requires. + repeated ReportingImpressionQualificationFilter + impression_qualification_filters = 2 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = IMMUTABLE + ]; + + // The metric subintervals to include in the report + repeated MetricFrequencySpec metric_frequency_specs = 3 + [(google.api.field_behavior) = IMMUTABLE]; + + // The maximum freuency to include in the report + int32 max_frequency = 4 [(google.api.field_behavior) = IMMUTABLE]; + } + // Specifies how to precompute report metrics. + CalculationSpec calculation_spec = 5; + + // Specifies whether and how the system tracks live campaigns. + // + // When live campaign tracking is enabled the system monitors the report's + // underlying Event Groups and appends new data as it becomes available. + message LiveCampaignTrackingSpec { + // Specifies whether and how to export data when new data arrives. + message ExportSpec { + // The PageTemplate to use for exporting results + // + // When instantiating the template, The ReportingUnit is taken to be + // the reporting_sets of the AdvancedReport. + string page_template = 1 [ + (google.api.resource_reference) = { + type: "reporting.halo-cmm.org/PageTemplate" + }, + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // If true, the exported data set will include data from the + // report's reporting_interval.start_time to the present. If + // false only new data is exported. + bool include_history = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OPTIONAL + ]; + } + // ExportSpec + ExportSpec export_spec = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OPTIONAL + ]; + } + // Specifies that live campaign tracking is enabled and options for + // how to handle newly arriving data. + // + // When enabled, metrics are appended as they become available, + // and if an export spec is present they are automatically exported as well. + LiveCampaignTrackingSpec live_campaign_tracking_spec = 6 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OPTIONAL + ]; + + // The time when the resource was created. + google.protobuf.Timestamp create_time = 7 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // The time when the resource was last updated. + google.protobuf.Timestamp update_time = 8 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OUTPUT_ONLY + ]; +} diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/advanced_reports_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/advanced_reports_service.proto new file mode 100644 index 00000000000..846c847907c --- /dev/null +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/advanced_reports_service.proto @@ -0,0 +1,250 @@ +// 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/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "wfa/measurement/reporting/v2alpha/advanced_report.proto"; +import "wfa/measurement/reporting/v2alpha/operation.proto"; +import "wfa/measurement/reporting/v2alpha/page.proto"; +import "wfa/measurement/reporting/v2alpha/reporting_interval.proto"; +import "wfa/measurement/reporting/v2alpha/reporting_unit.proto"; + +option java_package = "org.wfanet.measurement.reporting.v2alpha"; +option java_multiple_files = true; +option java_outer_classname = "AdvancedReportsServiceProto"; + +service AdvancedReports { + rpc CreateAdvancedReport(CreateAdvancedReportRequest) returns (Operation) { + option (google.api.http) = { + post: "/v2alpha/{parent=measurementConsumers/*}/advancedReports" + body: "advancedReport" + }; + option (google.api.method_signature) = "parent,advancedReport"; + } + + // Returns the `AdvancedReport` with the given resource key. + rpc GetAdvancedReport(GetAdvancedReportRequest) returns (AdvancedReport) { + option (google.api.http) = { + get: "/v2alpha/{name=measurementConsumers/*/advancedReports/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Ordered by `create_time` ascending, `name` ascending. + rpc ListAdvancedReports(ListAdvancedReportsRequest) + returns (ListAdvancedReportsResponse) { + option (google.api.http) = { + get: "/v2alpha/{parent=measurementConsumers/*}/advancedReports" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates the `AdvancedReport` with the given resource key. + // + // Only one in-progress update Operation is allow to exist at a time. + // TODO(@kungfucraig): Discuss - should we add a custom method for extending + // report end time and leave this for simpler updates (e.g. the title)? + rpc UpdateAdvancedReport(UpdateAdvancedReportRequest) returns (Operation) { + option (google.api.http) = { + get: "/v2alpha/{advancedReport.name=measurementConsumers/*/advancedReports/*}" + body: "advancedReport" + }; + option (google.api.method_signature) = "advancedReport,update_mask"; + } + + // Queries the `AdvancedReport` with the given resource key. + rpc QueryAdvancedReport(QueryAdvancedReportRequest) + returns (QueryAdvancedReportResponse) { + option (google.api.http) = { + get: "/v2alpha/{name=measurementConsumers/*/advancedReports/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Exports the `AdvancedReport` with the given resource key. + rpc ExportAdvancedReport(ExportAdvancedReportRequest) returns (Operation) { + option (google.api.http) = { + get: "/v2alpha/{name=measurementConsumers/*/advancedReports/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Specifies an AdvancedReport query using a PageTemplate and a ReportingUnit. +message PageTemplateSpec { + // The PageTemplate to instantiate. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "reporting.halo-cmm.org/PageTemplate" + } + ]; + + // The reporting unit to parameterize the PageTempalte with. + ReportingUnit reporting_unit = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Specifies how to query an AdvancedReport +message QuerySpec { + // The interval over which to query. + // + // If unspecified the entire interval associated with the Report is used. + // For Weekly metrics: + // 1) The start day must either be the start day of the report or be the + // same day of the week as the windowing criteria specified during report + // creation. + // 2) The end date must be either the end day of the report or be the same + // day of the week as the windowing criteria specified during report + // creation. + ReportingInterval reporting_interval = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. + oneof query { + // The PageSpec that describes the query to be run. + PageSpec page_spec = 2 [(google.api.field_behavior) = OPTIONAL]; + // A PageTemplateSpec that describes the query to be run. + PageTemplateSpec page_template_spec = 3 + [(google.api.field_behavior) = OPTIONAL]; + } +} + +// Request message for `CreateAdvancedReport` method +message CreateAdvancedReportRequest { + // The parent Measurement Consumer + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "reporting.halo-cmm.org/AdvancedReport" + } + ]; + + // The ID to use for the report, which will become the final component of + // the report's resource name. + // + // This must conform to RFC 1034, with the additional restriction that all + // letters must be lower-case. + string advanced_report_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // The AdvancedReport to create. + AdvancedReport advanced_report = 3; + + // A unique identifier for this request. Restricted to 36 ASCII characters. + // A random UUID is recommended. + // This request is only idempotent if a `request_id` is provided. + string request_id = 4; +} + +// Request message for `GetAdvancedReport` method +message GetAdvancedReportRequest { + // The name of the Advanced report to retrieve. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "reporting.halo-cmm.org/AdvancedReport" + } + ]; +} + +// Request message for `ListAdvancedReport` method +message ListAdvancedReportsRequest { + // The parent Measurement Consumer + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "reporting.halo-cmm.org/AdvancedReport" + } + ]; + + // Filter criteria. Repeated fields are treated as logical ORs, and multiple + // fields are treated as logical ANDs. + message Filter { + // Return AdvancedReports that were created after this time. + // (-- api-linter: core::0140::prepositions=disabled + // -- api-linter: core::0142::time-field-names=disabled + // aip.dev/not-precedent: Structured filters are used instead of the + // AIP-160 filtering language --) + google.protobuf.Timestamp create_time_after = 1 + [(google.api.field_behavior) = REQUIRED]; + } + + // Filter for the list of AdvancedReports + // (-- api-linter: core::0132::request-field-types=disabled + // aip.dev/not-precedent: Structured filters are used instead of the + // AIP-160 filtering language --) + Filter filter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // The maximum number of advanced reports to return. The service may return + // fewer than this value. If unspecified, at most 10 advanced reports will be + // returned. The maximum value is 25; values above 25 will be coerced to 25. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // A page token, received from a previous `ListAdvancedReports` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListAdvancedReports` + // must match the call that provided the page token. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for `ListAdvancedReports` method. +message ListAdvancedReportsResponse { + // The Advanced Reports that met the filter criteria + repeated AdvancedReport advanced_reports = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for `UpdateAdvancedReport` method +message UpdateAdvancedReportRequest { + AdvancedReport advanced_report = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to update. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for `QueryAdvancedReport` method +message QueryAdvancedReportRequest { + // Specifies the query to run. + QuerySpec query_spec = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for `QueryAdvancedReport` method +message QueryAdvancedReportResponse { + // The result of the query + PageResult page_result = 1; +} + +// Request message for `ExportAdvancedReport` method +message ExportAdvancedReportRequest { + QuerySpec query_spec = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Message used by the long running operation to provide the +// real response to the `ExportAdvancedReport` method +message ExportAdvancedReportResponse { + // TODO(@kungfucraig): Determine response parameters as part of the + // detailed design of export. +} diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/event_groups_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/event_groups_service.proto index 71ecab7695d..07ac9d457c8 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/event_groups_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/event_groups_service.proto @@ -16,9 +16,9 @@ syntax = "proto3"; package wfa.measurement.reporting.v2alpha; -import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/annotations.proto"; import "google/api/resource.proto"; import "wfa/measurement/reporting/v2alpha/event_group.proto"; diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter_spec.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter_spec.proto index 1607221bfba..4e80cde27d0 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter_spec.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter_spec.proto @@ -25,10 +25,6 @@ option java_multiple_files = true; option java_outer_classname = "ImpressionQualificationFilterSpecProto"; // Specifies impression qualification filter criteria for a MediaType -// -// If particular filter values are not applicable to the media they -// are applied to it is an error (e.g. DISPLAY cannot be filtered by -// percent completion) message ImpressionQualificationFilterSpec { // The Media Type the filter is applicable to. MediaType media_type = 1 [ diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/metric_calculation_specs_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/metric_calculation_specs_service.proto index a1d09817c3c..7a82254e925 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/metric_calculation_specs_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/metric_calculation_specs_service.proto @@ -16,9 +16,9 @@ syntax = "proto3"; package wfa.measurement.reporting.v2alpha; -import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/annotations.proto"; import "google/api/resource.proto"; import "wfa/measurement/reporting/v2alpha/metric_calculation_spec.proto"; diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/metrics_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/metrics_service.proto index d4168279f6f..dcfe8826e95 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/metrics_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/metrics_service.proto @@ -16,9 +16,9 @@ syntax = "proto3"; package wfa.measurement.reporting.v2alpha; -import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/annotations.proto"; import "google/api/resource.proto"; import "wfa/measurement/reporting/v2alpha/metric.proto"; diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/operation.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/operation.proto new file mode 100644 index 00000000000..1f3ab73205a --- /dev/null +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/operation.proto @@ -0,0 +1,43 @@ +// 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 "google/type/date.proto"; +import "google/type/datetime.proto"; + +option java_package = "org.wfanet.measurement.reporting.v2alpha"; +option java_multiple_files = true; +option java_outer_classname = "OperationProto"; + +// Resource representing a Advanced Report. +message Operation { + option (google.api.resource) = { + type: "reporting.halo-cmm.org/Operation" + pattern: "measurementConsumers/{measurement_consumer}/operations/{operation}" + singular: "operation" + plural: "operations" + }; + + // TODO(@kungfucraig): Discuss whether we should have a custom operation or + // use the one recommended by the AIP + // + // The custom operation would be a copy of the AIP one, but would use a oneof + // instead of an Any, any time an Any is used. +} diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto index a44147211d7..426acdfd622 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto @@ -45,8 +45,9 @@ message WindowingSpec { // Non-cumulative metrics NON_CUMULATIVE = 2; } - // How to accumulate results. + // How to accumulate results. Not available for AdvancedReport. AccumulationOptions accumulation_options = 2 [ + deprecated = true, (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE ]; @@ -110,6 +111,12 @@ message PageMetricSpec { // The average frequency bool average_frequency = 5 [(google.api.field_behavior) = IMMUTABLE]; + // The maximum frequency for which to compute a frequency histogram. + // + // The last bin in the historgram will contain values for + // all requencies >= the value provided here. + int32 frequency_histogram = 8 [(google.api.field_behavior) = IMMUTABLE]; + // The impression count bool impressions = 6 [(google.api.field_behavior) = IMMUTABLE]; @@ -117,10 +124,33 @@ message PageMetricSpec { bool grps = 7 [(google.api.field_behavior) = IMMUTABLE]; } + // A structure for specifying that new reach and new impressions be + // computed. + message NewReachMetricSetSpec { + // The new reach of all the unit(s) for the time period compared to + // all previous time encompassed by the reporting_interval + bool reach = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // The impressions associated with the new reach + bool impressions = 2 [(google.api.field_behavior) = IMMUTABLE]; + } + // Metrics to be computed over the entire reporting_unit message ReportingUnitMetricSetSpec { // Metrics for the union of the items in the reporting_unit - BasicMetricSetSpec basic = 1 [(google.api.field_behavior) = IMMUTABLE]; + BasicMetricSetSpec basic = 1 + [deprecated = true, (google.api.field_behavior) = IMMUTABLE]; + + // Non-cumulative metrics for the union of the reporting_unit components + BasicMetricSetSpec non_cumulative = 3 + [(google.api.field_behavior) = IMMUTABLE]; + + // Cumulative metrics for the union of the reporting_unit components + BasicMetricSetSpec cumulative = 4 [(google.api.field_behavior) = IMMUTABLE]; + + // Reach and associated impressions that are new to the time period for all + // components of the reporing_unit + NewReachMetricSetSpec new = 5 [(google.api.field_behavior) = IMMUTABLE]; // Compute a stacked incremental reach result for the reporting_unit // @@ -149,21 +179,48 @@ message PageMetricSpec { bool stacked_incremental_reach = 2 [(google.api.field_behavior) = IMMUTABLE]; } + // The set of metrics to compute for the entire reporting_unit ReportingUnitMetricSetSpec reporting_unit = 2 [(google.api.field_behavior) = IMMUTABLE]; // Metrics for each component of the reporting_unit message ComponentMetricSetSpec { // Basic metrics for each item in reporting_unit.components - BasicMetricSetSpec basic = 1 [(google.api.field_behavior) = IMMUTABLE]; + BasicMetricSetSpec basic = 1 + [deprecated = true, (google.api.field_behavior) = IMMUTABLE]; + + // Non-cumulative metrics for each component of the reporting_unit + BasicMetricSetSpec non_cumulative = 3 + [(google.api.field_behavior) = IMMUTABLE]; + + // Cumulative metrics for each component of the reporting_unit + BasicMetricSetSpec cumulative = 4 [(google.api.field_behavior) = IMMUTABLE]; - // The unique reach of each item in reporting_unit.components - // with respect to all other components + // The unique reach of each reporting unit in the + // reporting_unit with respect to all other reporting units. + // + // For example if reporting_sets=[RS1, RS2, RS3] the unique reach of + // RS1, RS2, and RS3 are computed. bool unique_reach = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // The impressions associated with the unique reach. + // Cannot be use in conjunction with component. + bool unique_reach_impressions = 5 [(google.api.field_behavior) = IMMUTABLE]; + + // Reach and associated impressions that are new to the time period for each + // component of the reporting_unit + NewReachMetricSetSpec new = 6 [(google.api.field_behavior) = IMMUTABLE]; + + // Reach and associated impressions that are new to the time period and + // uniquefor each component of the reporting_unit + NewReachMetricSetSpec new_unique = 7 + [(google.api.field_behavior) = IMMUTABLE]; } - // If reporting_unit.components is of size 1 the metrics computed for the - // component are identical to those computed for the entire reporting_unit. - // Specifying this value is not recommended in that case. + // Metrics for each component of the reporting_unit. + // + // If the number of components is 1 the metrics computed for the component + // are identical to those computed for the entire reporting unit. Specifying + // this value is not recommended in that case. ComponentMetricSetSpec component = 3 [(google.api.field_behavior) = IMMUTABLE]; @@ -185,9 +242,20 @@ message PageMetricSpec { // Metrics for each intersection BasicMetricSetSpec basic = 2 [ + deprecated = true, (google.api.field_behavior) = IMMUTABLE, (google.api.field_behavior) = REQUIRED ]; + + // Non-cumulative metrics for the various intersections + BasicMetricSetSpec non_cumulative = 3 + [(google.api.field_behavior) = IMMUTABLE]; + + // Cumulative metrics for the various intersections + BasicMetricSetSpec cumulative = 4 [(google.api.field_behavior) = IMMUTABLE]; + + // New reach metrics + NewReachMetricSetSpec new = 5 [(google.api.field_behavior) = IMMUTABLE]; } // Metrics for n-way intersections ComponentIntersectionMetricSetSpec component_intersection = 4 @@ -284,6 +352,14 @@ message Page { // The time interval over which the metrics were computed google.type.Interval time_interval = 2 + [deprecated = true, (google.api.field_behavior) = IMMUTABLE]; + + // The time interval over which non-cumulative results are computed. + google.type.Interval non_cumulative_time_interval = 6 + [(google.api.field_behavior) = IMMUTABLE]; + + // The time interval over which cumulative results are computed. + google.type.Interval cumulative_time_interval = 7 [(google.api.field_behavior) = IMMUTABLE]; // The windowing spec that was applied @@ -320,21 +396,44 @@ message Page { // The k+ reach where the index is frequency - 1. repeated int32 k_plus_reach = 3 [(google.api.field_behavior) = IMMUTABLE]; // The percent k+ reach - repeated float percent_k_plus_reach = 4 - [(google.api.field_behavior) = IMMUTABLE]; + repeated float percent_k_plus_reach = 4; // The average frequency float average_frequency = 5 [(google.api.field_behavior) = IMMUTABLE]; + // The frequency histogram where the index of the array is frequency-1 + repeated float frequency_histogram = 8 + [(google.api.field_behavior) = IMMUTABLE]; // The impression count int32 impressions = 6 [(google.api.field_behavior) = IMMUTABLE]; // The gross ratings points float grps = 7 [(google.api.field_behavior) = IMMUTABLE]; } + + // Metrics associated with the new reach of the reporting_unit + // or component thereof. + message NewReachMetricSet { + // The new reach + int32 reach = 1 [(google.api.field_behavior) = IMMUTABLE]; + // The impressions associated with the new reach + int32 impressions = 2 [(google.api.field_behavior) = IMMUTABLE]; + } + // Metrics for the entire reporting_unit. message ReportingUnitMetricSet { // The metrics for the union of the reporting_unit components - BasicMetricSet basic = 1 [(google.api.field_behavior) = IMMUTABLE]; + BasicMetricSet basic = 1 + [deprecated = true, (google.api.field_behavior) = IMMUTABLE]; + + // The non-cumulative metrics for the union of the reporting_unit + // components. + BasicMetricSet non_cumulative = 3 + [(google.api.field_behavior) = IMMUTABLE]; + + // The cumulative metrics for the union of the reporting_unit components. + BasicMetricSet cumulative = 4 [(google.api.field_behavior) = IMMUTABLE]; + // The metrics associated with the new reach of the reporting_unit + NewReachMetricSet new = 5 [(google.api.field_behavior) = IMMUTABLE]; - // The stacked incremental reach of the ReportingUnit. + // The stacked incremental reach of the Reporting Unit. // // For example if the units in the ReportingUnit were "rs1", "rs2", // "rs3" then the values in this array are as follows: @@ -350,11 +449,32 @@ message Page { // Metrics for a single component of the reporting_unit. message ComponentMetricSet { - // The basic metrics for this component - BasicMetricSet basic = 1 [(google.api.field_behavior) = IMMUTABLE]; + // The basic metrics for a reporting_unit component + BasicMetricSet basic = 1 + [deprecated = true, (google.api.field_behavior) = IMMUTABLE]; - // The component's unique reach + // The non-cumulative basic metrics for a reporting_unit component + BasicMetricSet non_cumulative = 3 + [(google.api.field_behavior) = IMMUTABLE]; + + // The cumulative basic metrics for a reporting_unit component + BasicMetricSet cumulative = 4 [(google.api.field_behavior) = IMMUTABLE]; + + // The unique reach of a reporting_unit component int32 unique_reach = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // The count of impressions associated with the unique reach + // of a reporting_unit component + int32 unique_reach_impressions = 5 + [(google.api.field_behavior) = IMMUTABLE]; + + // Metrics associated with the new reach of a reporting_unit component + NewReachMetricSet new = 6 [(google.api.field_behavior) = IMMUTABLE]; + + // Metrics associated with the new unique reach of a reporting_unit + // component + NewReachMetricSet new_unique = 7 + [(google.api.field_behavior) = IMMUTABLE]; } // Entry for `components` map. message ComponentMetricSetMapEntry { @@ -386,7 +506,18 @@ message Page { // ReportingSet resource names when used with an AdvancedReport. repeated string components = 1 [(google.api.field_behavior) = IMMUTABLE]; // Basic metrics for the intersection of the components - BasicMetricSet basic = 2 [(google.api.field_behavior) = IMMUTABLE]; + BasicMetricSet basic = 2 + [deprecated = true, (google.api.field_behavior) = IMMUTABLE]; + + // Non-cumulative metrics for the intersection of the components + BasicMetricSet non_cumulative = 3 + [(google.api.field_behavior) = IMMUTABLE]; + + // Cumulative metrics for the intersection of the components + BasicMetricSet cumulative = 4 [(google.api.field_behavior) = IMMUTABLE]; + + // Metrics associated with the new reach of the components + NewReachMetricSet new = 5 [(google.api.field_behavior) = IMMUTABLE]; } // The metrics for the requested intersections repeated ComponentIntersectionMetricSet component_intersections = 4 diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/page_template.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/page_template.proto new file mode 100644 index 00000000000..0a2cf5b45f0 --- /dev/null +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/page_template.proto @@ -0,0 +1,65 @@ +// 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 "wfa/measurement/reporting/v2alpha/page.proto"; + +option java_package = "org.wfanet.measurement.reporting.v2alpha"; +option java_multiple_files = true; +option java_outer_classname = "PageTemplateProto"; + +// Resource representing a Page Template +// +// A PageTempalte is essentially a PageSpec with an empty ReportingUnit. The +// ReportingUnit is determined when the PageTemplate is instantiated. +message PageTemplate { + option (google.api.resource) = { + type: "reporting.halo-cmm.org/PageTemplate" + // TODO(@kungfucraig): Make this multi-parented so that local markets and + // Halo can define built-in templates. + pattern: "measurementConsumers/{measurement_consumer}/pageTemplates/{page_template}" + singular: "pageTemplate" + plural: "pageTemplates" + }; + + // Resource name. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // A user friendly display name for the template + string display_name = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Specifies the window over which metrics are computed + // and whether they are cumulative or not. + WindowingSpec windowing_spec = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Specfies the dimensions over which the report is filtered and grouped. + DimensionSpec dimension_spec = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Specifies the Metrics to compute. + PageMetricSpec metric_spec = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; +} diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/page_templates_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/page_templates_service.proto new file mode 100644 index 00000000000..67b2cf4df10 --- /dev/null +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/page_templates_service.proto @@ -0,0 +1,167 @@ +// 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/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; +import "wfa/measurement/reporting/v2alpha/page.proto"; +import "wfa/measurement/reporting/v2alpha/page_template.proto"; +import "wfa/measurement/reporting/v2alpha/reporting_unit.proto"; + +option java_package = "org.wfanet.measurement.reporting.v2alpha"; +option java_multiple_files = true; +option java_outer_classname = "PageTemplatesServiceProto"; + +service PageTemplates { + rpc CreatePageTemplate(CreatePageTemplateRequest) returns (PageTemplate) { + option (google.api.http) = { + post: "/v2alpha/{parent=measurementConsumers/*}/pageTemplates" + body: "pageTemplate" + }; + option (google.api.method_signature) = "parent,pageTemplate"; + } + + // Returns the `PageTemplate` with the given resource key. + rpc GetPageTemplate(GetPageTemplateRequest) returns (PageTemplate) { + option (google.api.http) = { + get: "/v2alpha/{name=measurementConsumers/*/pageTemplates/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Ordered by `name` ascending. + rpc ListPageTemplates(ListPageTemplatesRequest) + returns (ListPageTemplatesResponse) { + option (google.api.http) = { + get: "/v2alpha/{parent=measurementConsumers/*}/pageTemplates" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a PageSpec from the PageTemplate. + // TODO(@kungfucraig): Discuss choice of verb. + rpc InstantiatePageSpec(InstantiatePageSpecRequest) returns (PageSpec) { + option (google.api.http) = { + get: "/v2alpha/{name=measurementConsumers/*/pageTemplates/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Request message for `CreatePageTemplate` method +message CreatePageTemplateRequest { + // The parent Measurement Consumer + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "reporting.halo-cmm.org/PageTemplate" + } + ]; + + // The ID to use for the page template, which will become the final component + // of the page template's resource name. + // + // This must conform to RFC 1034, with the additional restriction that all + // letters must be lower-case. + string page_template_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // The PageTemplate to create. + PageTemplate page_template = 3; + + // A unique identifier for this request. Restricted to 36 ASCII characters. + // A random UUID is recommended. + // This request is only idempotent if a `request_id` is provided. + string request_id = 4; +} + +// Request message for `GetPageTemplate` method +message GetPageTemplateRequest { + // The name of the Page Template to retrieve. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "reporting.halo-cmm.org/PageTemplate" + } + ]; +} + +// Request message for `ListPageTemplate` method +message ListPageTemplatesRequest { + // The parent Measurement Consumer + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "reporting.halo-cmm.org/PageTemplate" + } + ]; + + // Filter criteria. Repeated fields are treated as logical ORs, and multiple + // fields are treated as logical ANDs. + // TODO(@kungfucraig): Discuss - Do we need filters for this? Search by name or + // display name could be useful, but should postpone that until it is clear + // how these will be used via an UI. + message Filter {} + + // Filter for the list of PageTemplates + // (-- api-linter: core::0132::request-field-types=disabled + // aip.dev/not-precedent: Structured filters are used instead of the + // AIP-160 filtering language --) + Filter filter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // The maximum number of page templates to return. The service may return + // fewer than this value. If unspecified, at most 10 page templates reports + // will be returned. The maximum value is 25; values above 25 will be coerced + // to 25. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // A page token, received from a previous `ListPageTemplates` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListPageTemplates` must + // match the call that provided the page token. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for `ListPageTemplates` method. +message ListPageTemplatesResponse { + // The Page Templates that met the filter criteria + repeated PageTemplate page_templates = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for `InstantiatePageSpec` +message InstantiatePageSpecRequest { + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "reporting.halo-cmm.org/PageTemplate" + } + ]; + + // The reporting unit to include in the returned PageSpec. + ReportingUnit reporting_unit = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; +} diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/report_schedule_iterations_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/report_schedule_iterations_service.proto index 9f7f3319aaa..d1e50a59ab6 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/report_schedule_iterations_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/report_schedule_iterations_service.proto @@ -16,9 +16,9 @@ syntax = "proto3"; package wfa.measurement.reporting.v2alpha; -import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/annotations.proto"; import "google/api/resource.proto"; import "wfa/measurement/reporting/v2alpha/report_schedule_iteration.proto"; diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/report_schedules_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/report_schedules_service.proto index 59c6929fdae..040cfc4e3ab 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/report_schedules_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/report_schedules_service.proto @@ -16,9 +16,9 @@ syntax = "proto3"; package wfa.measurement.reporting.v2alpha; -import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/annotations.proto"; import "google/api/resource.proto"; import "wfa/measurement/reporting/v2alpha/report_schedule.proto"; diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_sets_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_sets_service.proto index 9ccfdd876bb..195dfedbdb5 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_sets_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/reporting_sets_service.proto @@ -16,9 +16,9 @@ syntax = "proto3"; package wfa.measurement.reporting.v2alpha; -import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/annotations.proto"; import "google/api/resource.proto"; import "wfa/measurement/reporting/v2alpha/reporting_set.proto"; diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/reports_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/reports_service.proto index bcbe24b12d2..3af93e58831 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/reports_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/reports_service.proto @@ -16,9 +16,9 @@ syntax = "proto3"; package wfa.measurement.reporting.v2alpha; -import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/annotations.proto"; import "google/api/resource.proto"; import "wfa/measurement/reporting/v2alpha/report.proto"; From 79aa7819c97a030d3e0980546e6878a4272f6470 Mon Sep 17 00:00:00 2001 From: kungfucraig Date: Sat, 18 Jan 2025 00:05:55 +0000 Subject: [PATCH 52/52] rebased --- .../measurement/reporting/v2alpha/BUILD.bazel | 32 ------------------- .../reporting/v2alpha/basic_report.proto | 2 +- .../impression_qualification_filter.proto | 8 ----- ...ession_qualification_filters_service.proto | 2 -- .../measurement/reporting/v2alpha/page.proto | 7 ---- 5 files changed, 1 insertion(+), 50 deletions(-) diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel index 20f340edd0e..fb2bfd2e46c 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/BUILD.bazel @@ -131,38 +131,6 @@ kt_jvm_proto_library( deps = [":impression_qualification_filter_spec_proto"], ) -proto_library( - name = "media_type_proto", - srcs = ["media_type.proto"], - strip_import_prefix = IMPORT_PREFIX, - deps = [ - ":reporting_common_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 = [ - "@com_google_googleapis//google/api:field_behavior_proto", - "@com_google_protobuf//:duration_proto", - "@com_google_googleapis//google/api:field_behavior_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"], diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto index 6bf0ee87503..a7924ffff83 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/basic_report.proto @@ -70,7 +70,7 @@ message BasicReport { // The custom criteria and any specific impression_qualification_filter may // each be used at most once. repeated ReportingImpressionQualificationFilter - impression_qualification_filters = 5 [ + impression_qualification_filters = 6 [ (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE ]; diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto index 934a526be15..f5c9979f50a 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto @@ -56,12 +56,4 @@ message ImpressionQualificationFilter { (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE ]; - - // Specifies the filter criteria for each MediaType. - // - // They may be at most one spec per MediaType. - repeated ImpressionQualificationFilterSpec filter_specs = 4 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; } diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filters_service.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filters_service.proto index b15b795e26d..9c923b10505 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filters_service.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/impression_qualification_filters_service.proto @@ -21,8 +21,6 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "wfa/measurement/reporting/v2alpha/impression_qualification_filter.proto"; -import "wfa/measurement/reporting/v2alpha/impression_qualification_filter_spec.proto"; -import "wfa/measurement/reporting/v2alpha/media_type.proto"; option java_package = "org.wfanet.measurement.reporting.v2alpha"; option java_multiple_files = true; diff --git a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto index 426acdfd622..0515cc27432 100644 --- a/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto +++ b/src/main/proto/wfa/measurement/reporting/v2alpha/page.proto @@ -333,13 +333,6 @@ message Page { [(google.api.field_behavior) = IMMUTABLE]; } - // A summary of each component of the reporting_unit reported on - message ReportingUnitSummary { - // Component summaries - repeated ReportingUnitComponentSummary reporting_unit_component_summary = - 1 [(google.api.field_behavior) = IMMUTABLE]; - } - // A summary of each component of the reporting_unit reported on message ReportingUnitSummary { // Component summaries