syntax = "proto3";

package test;

message M {
    optional M x1 = 1;
    repeated M x2 = 2;
    required M x3 = 3;
    M x4 = 4;

    optional test.M x5 = 5;
    repeated .test.M x6 = 6;
    .test.M x7 = 7;

    map<string, test.M> x8 = 8;
}

service S {
    rpc X1(M) returns (M) {}
    rpc X2(test.M) returns (.test.M) {}
    rpc X3(stream .test.M) returns (stream M) {}
}