syntax = "proto2";

package test;

service Foo {
    rpc Bar1(optional foo.Bar) returns (foo.Bar);
    rpc Bar2(foo.Bar) returns (repeated foo.Bar);
    rpc Bar2(foo.Bar) returns repeated foo.Bar;
    rpc Bar3(map<string, foo.Bar>) returns (foo.Bar);
    rpc Bar4(string, foo.Bar) returns (foo.Bar);
    rpc Bar5(foo.Bar) returns (foo.Bar, stream string);
    rpc Bar6(stream repeated foo.Bar) returns (foo.Bar);
    rpc Bar7(stream map<string, foo.Bar>) returns (foo.Bar);

    rpc Bar8(foo.(bar.baz)) returns (buf.build/x.y);
}