syntax = "proto3";
package pkg;
import "google/protobuf/descriptor.proto";

message Foo {
  oneof oneofFoo {
    option (oneof_foo) = "str";
    string foo = 1;
    FooEnum foo_enum = 2;
  }
  oneof oneofBar {
    option (oneof_bar) = "str";
    Bar bar = 3;
    Bar.BarNested bar_nested = 4;
  }
}

enum FooEnum {
  FOO_ENUM_X = 0;
  FOO_ENUM_Y = 1;
}
message Bar {
  string bar = 1;
  message BarNested {
    string bar = 1;
  }
}
extend google.protobuf.OneofOptions {
  optional string oneof_foo = 50000;
  optional string oneof_bar = 50001;
}
