Skip to content
protobuf.kmcd.dev

Practice

Protobuf Practice

Edit the schema, wait for the descriptor checks, and continue when everything passes.

Progress

Exercise 7: Oneof

7. Oneof
Context
A notification target can be identified by either a `user_id` or an `email`, but not both.
Task

Group user_id and email inside a oneof block named identifier.

schema.proto
Valid Schema
syntax = "proto3";

package practice;

message NotificationTarget {
  string user_id = 1;
  string email = 2;
}
EVALUATION_CHECKS
A oneof block named 'identifier' is declared.
Both 'user_id' and 'email' fields are members of the 'identifier' oneof.

Exercise Incomplete

Please satisfy all checks above