Skip to content

Commit

Permalink
Update public API for Event Groups. (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
robinsons committed Dec 6, 2021
1 parent fcea6b6 commit 2d729cd
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/main/proto/wfa/measurement/api/v2alpha/BUILD.bazel
Expand Up @@ -102,6 +102,7 @@ proto_library(
srcs = ["event_group.proto"],
strip_import_prefix = IMPORT_PREFIX,
deps = [
":crypto_proto",
"@com_google_googleapis//google/api:resource_proto",
],
)
Expand Down
37 changes: 35 additions & 2 deletions src/main/proto/wfa/measurement/api/v2alpha/event_group.proto
Expand Up @@ -17,6 +17,7 @@ syntax = "proto3";
package wfa.measurement.api.v2alpha;

import "google/api/resource.proto";
import "wfa/measurement/api/v2alpha/crypto.proto";

option java_package = "org.wfanet.measurement.api.v2alpha";
option java_multiple_files = true;
Expand All @@ -34,14 +35,46 @@ message EventGroup {
string name = 1;

// Resource name of the `MeasurementConsumer` associated with this
// `EventGroup`.
// `EventGroup`. Required. Immutable.
string measurement_consumer = 2 [(google.api.resource_reference).type =
"halo.wfanet.org/MeasurementConsumer"];

// Resource name of the `Certificate` belonging to `measurement_consumer`.
// Must be set if `measurement_consumer_public_key` is set.
string measurement_consumer_certificate = 3
[(google.api.resource_reference).type = "halo.wfanet.org/Certificate"];

// Pre-shared serialized `EncryptionPublicKey`, which can be verified using
// `measurement_consumer_certificate`. Must be set if `encrypted_metadata` is
// set.
SignedData measurement_consumer_public_key = 4;

// ID referencing the `EventGroup` in an external system, provided by the
// `DataProvider`.
//
// If set, this value must be unique among `EventGroup`s for the parent
// `DataProvider`.
string event_group_reference_id = 3;
string event_group_reference_id = 5;

// The set of VID model lines used to label events in this `EventGroup`.
// Required.
repeated string vid_model_lines = 6;

message EventTemplate {
// The type of the Event Template. A fully-qualified protobuf message type.
// Required.
string type = 1;
}

// The `EventTemplate`s that events associated with this `EventGroup` conform
// to.
repeated EventTemplate event_templates = 7;

// Wrapper for per-EDP Event Group metadata.
// TODO(robinsonsc): Complete design for metadata registration and update.
message Metadata {}

// Encrypted serialized `Metadata`. The encryption uses
// `measurement_consumer_public_key` as the recipient public key.
bytes encrypted_metadata = 8;
}
Expand Up @@ -32,6 +32,11 @@ service EventGroups {
// `DataProvider`'s system.
rpc CreateEventGroup(CreateEventGroupRequest) returns (EventGroup) {}

// Updates an existing `EventGroup`. Results in a `PERMISSION_DENIED` error if
// the authenticated user does not have access to the `EventGroup`. Results in
// a `NOT_FOUND` error if the the specified `EventGroup` does not exist.
rpc UpdateEventGroup(UpdateEventGroupRequest) returns (EventGroup) {}

// Lists `EventGroup`s. Results in a `PERMISSION_DENIED` error if attempting
// to list `EventGroup`s that the authenticated user does not have access to.
rpc ListEventGroups(ListEventGroupsRequest)
Expand Down Expand Up @@ -59,6 +64,12 @@ message CreateEventGroupRequest {
EventGroup event_group = 2;
}

// Request message for `UpdateEventGroup` method.
message UpdateEventGroupRequest {
// The `EventGroup` to update. Required.
EventGroup event_group = 1;
}

message ListEventGroupsRequest {
// Resource key of the parent `DataProvider`. The wildcard ID (`-`) may be
// used in place of the `DataProvider` ID to list across `DataProvider`s, in
Expand Down

0 comments on commit 2d729cd

Please sign in to comment.