-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add proto definition for simulator synthetic data specification
- Loading branch information
Showing
2 changed files
with
117 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
92 changes: 92 additions & 0 deletions
92
.../measurement/api/v2alpha/event_group_metadata/testing/simulator_synthetic_data_spec.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
// Copyright 2023 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.api.v2alpha.event_group_metadata.testing; | ||
|
||
import "google/protobuf/descriptor.proto"; | ||
import "google/type/date.proto"; | ||
|
||
option java_package = "org.wfanet.measurement.api.v2alpha.event_group_metadata.testing"; | ||
option java_multiple_files = true; | ||
|
||
message SimulatorSyntheticDataSpec { | ||
repeated SyntheticEventGroupSpec event_group_spec = 1; | ||
SyntheticPopulationSpec population = 2; | ||
} | ||
|
||
// A sequence of VIDs represented with an inclusive beginning and end. | ||
message VidInterval { | ||
int64 begin = 1; | ||
int64 end = 2; | ||
} | ||
|
||
// The specification of the entire VID space. | ||
message SyntheticPopulationSpec { | ||
VidInterval vid_interval = 1; | ||
|
||
// For Age, Gender, Social Grade ... | ||
// These need to be assigned at the VID level here. When generating a | ||
// SimulatorSyntheticData you need to import the necessary EventTemplate. | ||
repeated google.protobuf.FieldDescriptorProto population_fields = 2; | ||
|
||
// For Device, Location, Duration ... | ||
// These need to be assigned at the impression level in the FrequencySpec. | ||
repeated google.protobuf.FieldDescriptorProto non_population_fields = 3; | ||
|
||
message SubPopulation { | ||
VidInterval vid_sub_interval = 1; | ||
|
||
// A list of the same length as the population field descriptors whose | ||
// values are one of each of the values for the field descriptor | ||
// (e.g. if the first field descriptor is age bucket, then the first | ||
// value in this list is a particular age bucket). This list should be | ||
// unique across subpopulations. | ||
repeated string population_fields_values = 2; | ||
} | ||
repeated SubPopulation sub_populations = 4; | ||
} | ||
|
||
|
||
// Each Synthetic event group spec indicates which VID intervals are reached. | ||
message SyntheticEventGroupSpec { | ||
string property_under_measurement = 1; | ||
string description = 2; | ||
|
||
// The VIDs reached with their frequency non-population attributes. | ||
message FrequencySpec { | ||
int64 frequency = 1; | ||
// The VID intervals should be sub-intervals of SubPopulations. | ||
message VidIntervalSpec { | ||
VidInterval vid_intervals = 1; | ||
|
||
// A list of the same length as the non-population field descriptors | ||
// whose values are one of each of the values for the field | ||
// descriptor (e.g. if the first field descriptor is device bucket, | ||
// then the first value in this list is a particular device). | ||
repeated string non_population_field_values = 2; | ||
} | ||
repeated VidIntervalSpec vid_interval_specs = 2; | ||
} | ||
|
||
message DateSpec { | ||
// Date the VIDs were reached. | ||
google.type.Date date = 1; | ||
// Each FrequencySpec must have a unique frequency. | ||
repeated FrequencySpec frequency_specs = 2; | ||
} | ||
|
||
repeated DateSpec date_specs = 3; | ||
} |