syntax = "proto2";

package test;

message Foo {
    enum Bar { BAZ = 1; }

    extend x { 
        optional int32 x = 1;
    }
    extend BAZ {
        optional int32 y = 2;
    }
    extend Bar {
        optional int32 z = 3;
    }
    extend test {
        optional int32 w = 4;
    }

    oneof self {
        int32 a = 5;
    }

    extend self {
        optional int32 b = 6;
    }

    extend string {
        optional int32 capacity = 7;
    }
}