diff --git a/test/Makefile b/test/Makefile index 4b74fd34..1c9cf24e 100644 --- a/test/Makefile +++ b/test/Makefile @@ -3,6 +3,12 @@ regenerate: protoc proto/test/test.proto \ --gopherjs_out=plugins=grpc,Mgoogle/protobuf/empty.proto=github.com/johanbrandhorst/protobuf/ptypes/empty:./client/ \ --go_out=plugins=grpc:./server/ + protoc ../protoc-gen-gopherjs/test/multi/multi1.proto ../protoc-gen-gopherjs/test/multi/multi2.proto ../protoc-gen-gopherjs/test/multi/multi3.proto \ + -I../protoc-gen-gopherjs/test \ + --go_out=plugins=grpc,Mmulti/multi1.proto=github.com/johanbrandhorst/protobuf/protoc-gen-gopherjs/test/multi:./server/proto + protoc ../protoc-gen-gopherjs/test/types/types.proto \ + -I../protoc-gen-gopherjs/test \ + --go_out=plugins=grpc,Mmulti/multi1.proto=github.com/johanbrandhorst/protobuf/test/server/proto/multi:./server/proto # Regenerate dependencies (cd ../protoc-gen-gopherjs/test && make regenerate) diff --git a/test/client/main.go b/test/client/main.go index ab5469bc..ecc92743 100644 --- a/test/client/main.go +++ b/test/client/main.go @@ -4,6 +4,8 @@ import ( "context" "fmt" "io" + "net/url" + "reflect" "strings" "github.com/gopherjs/gopherjs/js" @@ -17,6 +19,8 @@ import ( "github.com/johanbrandhorst/protobuf/grpcweb/status" grpctest "github.com/johanbrandhorst/protobuf/grpcweb/test" gentest "github.com/johanbrandhorst/protobuf/protoc-gen-gopherjs/test" + "github.com/johanbrandhorst/protobuf/protoc-gen-gopherjs/test/multi" + "github.com/johanbrandhorst/protobuf/protoc-gen-gopherjs/test/types" "github.com/johanbrandhorst/protobuf/ptypes/empty" "github.com/johanbrandhorst/protobuf/test/client/proto/test" "github.com/johanbrandhorst/protobuf/test/recoverer" @@ -25,7 +29,15 @@ import ( //go:generate gopherjs build main.go -o html/index.js -var uri = strings.TrimSuffix(dom.GetWindow().Document().BaseURI(), shared.GopherJSServer+"/") +var uri string + +func init() { + u, err := url.Parse(dom.GetWindow().Document().BaseURI()) + if err != nil { + panic(err) + } + uri = u.Scheme + "://" + u.Hostname() +} func typeTests() { qunit.Module("Integration Types tests") @@ -829,6 +841,220 @@ func serverTests(label, serverAddr, emptyServerAddr string) { return nil }) + + qunit.AsyncTest("Unary call to echo server with many types", func() interface{} { + c := types.NewEchoServiceClient(uri + serverAddr) + req := &types.TestAllTypes{ + SingleInt32: 1, + SingleInt64: 2, + SingleUint32: 3, + SingleUint64: 4, + SingleSint32: 5, + SingleSint64: 6, + SingleFixed32: 7, + SingleFixed64: 8, + SingleSfixed32: 9, + SingleSfixed64: 10, + SingleFloat: 10.5, + SingleDouble: 11.5, + SingleBool: true, + SingleString: "Alfred", + SingleBytes: []byte("Megan"), + SingleNestedEnum: types.TestAllTypes_BAR, + SingleForeignEnum: types.ForeignEnum_FOREIGN_BAR, + SingleImportedMessage: &multitest.Multi1{ + Color: multitest.Multi2_GREEN, + HatType: multitest.Multi3_FEDORA, + }, + SingleNestedMessage: &types.TestAllTypes_NestedMessage{ + B: 12, + }, + SingleForeignMessage: &types.ForeignMessage{ + C: 13, + }, + RepeatedInt32: []int32{14, 15}, + RepeatedInt64: []int64{16, 17}, + RepeatedUint32: []uint32{18, 19}, + RepeatedUint64: []uint64{20, 21}, + RepeatedSint32: []int32{22, 23}, + RepeatedSint64: []int64{24, 25}, + RepeatedFixed32: []uint32{26, 27}, + RepeatedFixed64: []uint64{28, 29}, + RepeatedSfixed32: []int32{30, 31}, + RepeatedSfixed64: []int64{32, 33}, + RepeatedFloat: []float32{34.33, 35.34}, + RepeatedDouble: []float64{36.35, 37.36}, + RepeatedBool: []bool{true, false, true}, + RepeatedString: []string{"Alfred", "Robin", "Simon"}, + RepeatedBytes: [][]byte{[]byte("David"), []byte("Henrik")}, + RepeatedNestedEnum: []types.TestAllTypes_NestedEnum{types.TestAllTypes_BAR, types.TestAllTypes_BAZ}, + RepeatedForeignEnum: []types.ForeignEnum{types.ForeignEnum_FOREIGN_BAR, types.ForeignEnum_FOREIGN_BAZ}, + RepeatedImportedMessage: []*multitest.Multi1{ + { + Color: multitest.Multi2_RED, + HatType: multitest.Multi3_FEZ, + }, + { + Color: multitest.Multi2_GREEN, + HatType: multitest.Multi3_FEDORA, + }, + }, + RepeatedNestedMessage: []*types.TestAllTypes_NestedMessage{ + { + B: 38, + }, + { + B: 39, + }, + }, + RepeatedForeignMessage: []*types.ForeignMessage{ + { + C: 40, + }, + { + C: 41, + }, + }, + OneofField: &types.TestAllTypes_OneofImportedMessage{ + OneofImportedMessage: &multitest.Multi1{ + Multi2: &multitest.Multi2{ + RequiredValue: 42, + Color: multitest.Multi2_BLUE, + }, + Color: multitest.Multi2_RED, + HatType: multitest.Multi3_FEDORA, + }, + }, + } + + go func() { + defer recoverer.Recover() // recovers any panics and fails tests + defer qunit.Start() + + resp, err := c.EchoAllTypes(context.Background(), req) + if err != nil { + st := status.FromError(err) + qunit.Ok(false, "Unexpected error:"+st.Error()) + return + } + if !reflect.DeepEqual(req, resp) { + qunit.Ok(false, fmt.Sprintf("response and request differed: Req:\n%v\nResp:\n%v", req, resp)) + return + } + + qunit.Ok(true, "Request and Response matched") + }() + + return nil + }) + + qunit.AsyncTest("Unary call to echo server with many maps", func() interface{} { + c := types.NewEchoServiceClient(uri + serverAddr) + req := &types.TestMap{ + MapInt32Int32: map[int32]int32{ + 1: 2, + 3: 4, + }, + MapInt64Int64: map[int64]int64{ + 5: 6, + 7: 8, + }, + MapUint32Uint32: map[uint32]uint32{ + 9: 10, + 11: 12, + }, + MapUint64Uint64: map[uint64]uint64{ + 13: 14, + 15: 16, + }, + MapSint32Sint32: map[int32]int32{ + 17: 18, + 19: 20, + }, + MapSint64Sint64: map[int64]int64{ + 21: 22, + 23: 24, + }, + MapFixed32Fixed32: map[uint32]uint32{ + 25: 26, + 27: 28, + }, + MapFixed64Fixed64: map[uint64]uint64{ + 29: 30, + 31: 32, + }, + MapSfixed32Sfixed32: map[int32]int32{ + 33: 34, + 35: 36, + }, + MapSfixed64Sfixed64: map[int64]int64{ + 37: 38, + 39: 40, + }, + MapInt32Float: map[int32]float32{ + 41: 42.41, + 432: 44.43, + }, + MapInt32Double: map[int32]float64{ + 45: 46.45, + 47: 48.47, + }, + MapBoolBool: map[bool]bool{ + true: false, + false: false, + }, + MapStringString: map[string]string{ + "Henrik": "David", + "Simon": "Robin", + }, + MapInt32Bytes: map[int32][]byte{ + 49: []byte("Astrid"), + 50: []byte("Ebba"), + }, + MapInt32Enum: map[int32]types.MapEnum{ + 51: types.MapEnum_MAP_ENUM_BAR, + 52: types.MapEnum_MAP_ENUM_BAZ, + }, + MapInt32ForeignMessage: map[int32]*types.ForeignMessage{ + 53: {C: 54}, + 55: {C: 56}, + }, + MapInt32ImportedMessage: map[int32]*multitest.Multi1{ + 57: { + Multi2: &multitest.Multi2{ + RequiredValue: 58, + Color: multitest.Multi2_RED, + }, + Color: multitest.Multi2_GREEN, + HatType: multitest.Multi3_FEZ, + }, + 59: { + Color: multitest.Multi2_BLUE, + HatType: multitest.Multi3_FEDORA, + }, + }, + } + + go func() { + defer recoverer.Recover() // recovers any panics and fails tests + defer qunit.Start() + + resp, err := c.EchoMaps(context.Background(), req) + if err != nil { + st := status.FromError(err) + qunit.Ok(false, "Unexpected error:"+st.Error()) + return + } + if !reflect.DeepEqual(req, resp) { + qunit.Ok(false, fmt.Sprintf("response and request differed: Req:\n%v\nResp:\n%v", req, resp)) + return + } + + qunit.Ok(true, "Request and Response matched") + }() + + return nil + }) } func main() { diff --git a/test/server/main.go b/test/server/main.go index 40504db0..77258029 100644 --- a/test/server/main.go +++ b/test/server/main.go @@ -19,12 +19,14 @@ import ( "google.golang.org/grpc/transport" testproto "github.com/johanbrandhorst/protobuf/test/server/proto/test" + "github.com/johanbrandhorst/protobuf/test/server/proto/types" "github.com/johanbrandhorst/protobuf/test/shared" ) func main() { grpcServer := grpc.NewServer() testproto.RegisterTestServiceServer(grpcServer, &testSrv{}) + types.RegisterEchoServiceServer(grpcServer, &testSrv{}) grpclog.SetLogger(log.New(os.Stdout, "testserver: ", log.LstdFlags)) wrappedServer := grpcweb.WrapServer(grpcServer) @@ -199,3 +201,11 @@ func (s *testSrv) PingList(ping *testproto.PingRequest, stream testproto.TestSer } return nil } + +func (s *testSrv) EchoAllTypes(ctx context.Context, in *types.TestAllTypes) (*types.TestAllTypes, error) { + return in, nil +} + +func (s *testSrv) EchoMaps(ctx context.Context, in *types.TestMap) (*types.TestMap, error) { + return in, nil +} diff --git a/test/server/proto/multi/multi1.pb.go b/test/server/proto/multi/multi1.pb.go new file mode 100644 index 00000000..36d34d91 --- /dev/null +++ b/test/server/proto/multi/multi1.pb.go @@ -0,0 +1,84 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: multi/multi1.proto + +/* +Package multitest is a generated protocol buffer package. + +It is generated from these files: + multi/multi1.proto + multi/multi2.proto + multi/multi3.proto + +It has these top-level messages: + Multi1 + Multi2 + Multi3 +*/ +package multitest + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + +type Multi1 struct { + Multi2 *Multi2 `protobuf:"bytes,1,opt,name=multi2" json:"multi2,omitempty"` + Color Multi2_Color `protobuf:"varint,2,opt,name=color,enum=multitest.Multi2_Color" json:"color,omitempty"` + HatType Multi3_HatType `protobuf:"varint,3,opt,name=hat_type,json=hatType,enum=multitest.Multi3_HatType" json:"hat_type,omitempty"` +} + +func (m *Multi1) Reset() { *m = Multi1{} } +func (m *Multi1) String() string { return proto.CompactTextString(m) } +func (*Multi1) ProtoMessage() {} +func (*Multi1) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +func (m *Multi1) GetMulti2() *Multi2 { + if m != nil { + return m.Multi2 + } + return nil +} + +func (m *Multi1) GetColor() Multi2_Color { + if m != nil { + return m.Color + } + return Multi2_BLUE +} + +func (m *Multi1) GetHatType() Multi3_HatType { + if m != nil { + return m.HatType + } + return Multi3_FEDORA +} + +func init() { + proto.RegisterType((*Multi1)(nil), "multitest.Multi1") +} + +func init() { proto.RegisterFile("multi/multi1.proto", fileDescriptor0) } + +var fileDescriptor0 = []byte{ + // 156 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xca, 0x2d, 0xcd, 0x29, + 0xc9, 0xd4, 0x07, 0x93, 0x86, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x9c, 0x60, 0x5e, 0x49, + 0x6a, 0x71, 0x89, 0x14, 0xb2, 0xb4, 0x11, 0x44, 0x1a, 0x45, 0xcc, 0x18, 0x22, 0xa6, 0x34, 0x83, + 0x91, 0x8b, 0xcd, 0x17, 0x6c, 0x86, 0x90, 0x26, 0x17, 0x1b, 0x44, 0xb9, 0x04, 0xa3, 0x02, 0xa3, + 0x06, 0xb7, 0x91, 0xa0, 0x1e, 0xdc, 0x38, 0x3d, 0xb0, 0x12, 0xa3, 0x20, 0xa8, 0x02, 0x21, 0x5d, + 0x2e, 0xd6, 0xe4, 0xfc, 0x9c, 0xfc, 0x22, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x3e, 0x23, 0x71, 0x0c, + 0x95, 0x7a, 0xce, 0x20, 0xe9, 0x20, 0x88, 0x2a, 0x21, 0x13, 0x2e, 0x8e, 0x8c, 0xc4, 0x92, 0xf8, + 0x92, 0xca, 0x82, 0x54, 0x09, 0x66, 0xb0, 0x0e, 0x49, 0x74, 0x1d, 0xc6, 0x7a, 0x1e, 0x89, 0x25, + 0x21, 0x95, 0x05, 0xa9, 0x41, 0xec, 0x19, 0x10, 0x46, 0x12, 0x1b, 0xd8, 0x85, 0xc6, 0x80, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x00, 0xe5, 0xa5, 0x2c, 0xea, 0x00, 0x00, 0x00, +} diff --git a/test/server/proto/multi/multi2.pb.go b/test/server/proto/multi/multi2.pb.go new file mode 100644 index 00000000..da5e3570 --- /dev/null +++ b/test/server/proto/multi/multi2.pb.go @@ -0,0 +1,82 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: multi/multi2.proto + +package multitest + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +type Multi2_Color int32 + +const ( + Multi2_BLUE Multi2_Color = 0 + Multi2_GREEN Multi2_Color = 1 + Multi2_RED Multi2_Color = 2 +) + +var Multi2_Color_name = map[int32]string{ + 0: "BLUE", + 1: "GREEN", + 2: "RED", +} +var Multi2_Color_value = map[string]int32{ + "BLUE": 0, + "GREEN": 1, + "RED": 2, +} + +func (x Multi2_Color) String() string { + return proto.EnumName(Multi2_Color_name, int32(x)) +} +func (Multi2_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{0, 0} } + +type Multi2 struct { + RequiredValue int32 `protobuf:"varint,1,opt,name=required_value,json=requiredValue" json:"required_value,omitempty"` + Color Multi2_Color `protobuf:"varint,2,opt,name=color,enum=multitest.Multi2_Color" json:"color,omitempty"` +} + +func (m *Multi2) Reset() { *m = Multi2{} } +func (m *Multi2) String() string { return proto.CompactTextString(m) } +func (*Multi2) ProtoMessage() {} +func (*Multi2) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } + +func (m *Multi2) GetRequiredValue() int32 { + if m != nil { + return m.RequiredValue + } + return 0 +} + +func (m *Multi2) GetColor() Multi2_Color { + if m != nil { + return m.Color + } + return Multi2_BLUE +} + +func init() { + proto.RegisterType((*Multi2)(nil), "multitest.Multi2") + proto.RegisterEnum("multitest.Multi2_Color", Multi2_Color_name, Multi2_Color_value) +} + +func init() { proto.RegisterFile("multi/multi2.proto", fileDescriptor1) } + +var fileDescriptor1 = []byte{ + // 158 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xca, 0x2d, 0xcd, 0x29, + 0xc9, 0xd4, 0x07, 0x93, 0x46, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x9c, 0x60, 0x5e, 0x49, + 0x6a, 0x71, 0x89, 0x52, 0x2b, 0x23, 0x17, 0x9b, 0x2f, 0x58, 0x4e, 0x48, 0x95, 0x8b, 0xaf, 0x28, + 0xb5, 0xb0, 0x34, 0xb3, 0x28, 0x35, 0x25, 0xbe, 0x2c, 0x31, 0xa7, 0x34, 0x55, 0x82, 0x51, 0x81, + 0x51, 0x83, 0x35, 0x88, 0x17, 0x26, 0x1a, 0x06, 0x12, 0x14, 0xd2, 0xe5, 0x62, 0x4d, 0xce, 0xcf, + 0xc9, 0x2f, 0x92, 0x60, 0x52, 0x60, 0xd4, 0xe0, 0x33, 0x12, 0xd7, 0x83, 0x1b, 0xa6, 0x07, 0x31, + 0x48, 0xcf, 0x19, 0x24, 0x1d, 0x04, 0x51, 0xa5, 0xa4, 0xca, 0xc5, 0x0a, 0xe6, 0x0b, 0x71, 0x70, + 0xb1, 0x38, 0xf9, 0x84, 0xba, 0x0a, 0x30, 0x08, 0x71, 0x72, 0xb1, 0xba, 0x07, 0xb9, 0xba, 0xfa, + 0x09, 0x30, 0x0a, 0xb1, 0x73, 0x31, 0x07, 0xb9, 0xba, 0x08, 0x30, 0x25, 0xb1, 0x81, 0x5d, 0x66, + 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x8f, 0xfd, 0x26, 0x02, 0xaf, 0x00, 0x00, 0x00, +} diff --git a/test/server/proto/multi/multi3.pb.go b/test/server/proto/multi/multi3.pb.go new file mode 100644 index 00000000..0afef527 --- /dev/null +++ b/test/server/proto/multi/multi3.pb.go @@ -0,0 +1,69 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: multi/multi3.proto + +package multitest + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +type Multi3_HatType int32 + +const ( + Multi3_FEDORA Multi3_HatType = 0 + Multi3_FEZ Multi3_HatType = 1 +) + +var Multi3_HatType_name = map[int32]string{ + 0: "FEDORA", + 1: "FEZ", +} +var Multi3_HatType_value = map[string]int32{ + "FEDORA": 0, + "FEZ": 1, +} + +func (x Multi3_HatType) String() string { + return proto.EnumName(Multi3_HatType_name, int32(x)) +} +func (Multi3_HatType) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{0, 0} } + +type Multi3 struct { + HatType Multi3_HatType `protobuf:"varint,1,opt,name=hat_type,json=hatType,enum=multitest.Multi3_HatType" json:"hat_type,omitempty"` +} + +func (m *Multi3) Reset() { *m = Multi3{} } +func (m *Multi3) String() string { return proto.CompactTextString(m) } +func (*Multi3) ProtoMessage() {} +func (*Multi3) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} } + +func (m *Multi3) GetHatType() Multi3_HatType { + if m != nil { + return m.HatType + } + return Multi3_FEDORA +} + +func init() { + proto.RegisterType((*Multi3)(nil), "multitest.Multi3") + proto.RegisterEnum("multitest.Multi3_HatType", Multi3_HatType_name, Multi3_HatType_value) +} + +func init() { proto.RegisterFile("multi/multi3.proto", fileDescriptor2) } + +var fileDescriptor2 = []byte{ + // 126 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xca, 0x2d, 0xcd, 0x29, + 0xc9, 0xd4, 0x07, 0x93, 0xc6, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x9c, 0x60, 0x5e, 0x49, + 0x6a, 0x71, 0x89, 0x52, 0x1c, 0x17, 0x9b, 0x2f, 0x58, 0x4a, 0xc8, 0x84, 0x8b, 0x23, 0x23, 0xb1, + 0x24, 0xbe, 0xa4, 0xb2, 0x20, 0x55, 0x82, 0x51, 0x81, 0x51, 0x83, 0xcf, 0x48, 0x52, 0x0f, 0xae, + 0x4e, 0x0f, 0xa2, 0x48, 0xcf, 0x23, 0xb1, 0x24, 0xa4, 0xb2, 0x20, 0x35, 0x88, 0x3d, 0x03, 0xc2, + 0x50, 0x92, 0xe3, 0x62, 0x87, 0x8a, 0x09, 0x71, 0x71, 0xb1, 0xb9, 0xb9, 0xba, 0xf8, 0x07, 0x39, + 0x0a, 0x30, 0x08, 0xb1, 0x73, 0x31, 0xbb, 0xb9, 0x46, 0x09, 0x30, 0x26, 0xb1, 0x81, 0x6d, 0x34, + 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xca, 0xe9, 0x58, 0xad, 0x87, 0x00, 0x00, 0x00, +} diff --git a/test/server/proto/types/types.pb.go b/test/server/proto/types/types.pb.go new file mode 100644 index 00000000..a5bbe569 --- /dev/null +++ b/test/server/proto/types/types.pb.go @@ -0,0 +1,1094 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: types/types.proto + +/* +Package types is a generated protocol buffer package. + +It is generated from these files: + types/types.proto + +It has these top-level messages: + TestAllTypes + NestedTestAllTypes + ForeignMessage + TestMap +*/ +package types + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import multitest2 "github.com/johanbrandhorst/protobuf/test/server/proto/multi" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + +type ForeignEnum int32 + +const ( + ForeignEnum_FOREIGN_UNSPECIFIED ForeignEnum = 0 + ForeignEnum_FOREIGN_FOO ForeignEnum = 4 + ForeignEnum_FOREIGN_BAR ForeignEnum = 5 + ForeignEnum_FOREIGN_BAZ ForeignEnum = 6 +) + +var ForeignEnum_name = map[int32]string{ + 0: "FOREIGN_UNSPECIFIED", + 4: "FOREIGN_FOO", + 5: "FOREIGN_BAR", + 6: "FOREIGN_BAZ", +} +var ForeignEnum_value = map[string]int32{ + "FOREIGN_UNSPECIFIED": 0, + "FOREIGN_FOO": 4, + "FOREIGN_BAR": 5, + "FOREIGN_BAZ": 6, +} + +func (x ForeignEnum) String() string { + return proto.EnumName(ForeignEnum_name, int32(x)) +} +func (ForeignEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +type MapEnum int32 + +const ( + MapEnum_MAP_ENUM_FOO MapEnum = 0 + MapEnum_MAP_ENUM_BAR MapEnum = 1 + MapEnum_MAP_ENUM_BAZ MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MAP_ENUM_FOO", + 1: "MAP_ENUM_BAR", + 2: "MAP_ENUM_BAZ", +} +var MapEnum_value = map[string]int32{ + "MAP_ENUM_FOO": 0, + "MAP_ENUM_BAR": 1, + "MAP_ENUM_BAZ": 2, +} + +func (x MapEnum) String() string { + return proto.EnumName(MapEnum_name, int32(x)) +} +func (MapEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +type TestAllTypes_NestedEnum int32 + +const ( + TestAllTypes_NESTED_ENUM_UNSPECIFIED TestAllTypes_NestedEnum = 0 + TestAllTypes_FOO TestAllTypes_NestedEnum = 1 + TestAllTypes_BAR TestAllTypes_NestedEnum = 2 + TestAllTypes_BAZ TestAllTypes_NestedEnum = 3 + TestAllTypes_NEG TestAllTypes_NestedEnum = -1 +) + +var TestAllTypes_NestedEnum_name = map[int32]string{ + 0: "NESTED_ENUM_UNSPECIFIED", + 1: "FOO", + 2: "BAR", + 3: "BAZ", + -1: "NEG", +} +var TestAllTypes_NestedEnum_value = map[string]int32{ + "NESTED_ENUM_UNSPECIFIED": 0, + "FOO": 1, + "BAR": 2, + "BAZ": 3, + "NEG": -1, +} + +func (x TestAllTypes_NestedEnum) String() string { + return proto.EnumName(TestAllTypes_NestedEnum_name, int32(x)) +} +func (TestAllTypes_NestedEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} } + +// This proto includes every type of field in both singular and repeated +// forms. +type TestAllTypes struct { + // Singular + SingleInt32 int32 `protobuf:"varint,1,opt,name=single_int32,json=singleInt32" json:"single_int32,omitempty"` + SingleInt64 int64 `protobuf:"varint,2,opt,name=single_int64,json=singleInt64" json:"single_int64,omitempty"` + SingleUint32 uint32 `protobuf:"varint,3,opt,name=single_uint32,json=singleUint32" json:"single_uint32,omitempty"` + SingleUint64 uint64 `protobuf:"varint,4,opt,name=single_uint64,json=singleUint64" json:"single_uint64,omitempty"` + SingleSint32 int32 `protobuf:"zigzag32,5,opt,name=single_sint32,json=singleSint32" json:"single_sint32,omitempty"` + SingleSint64 int64 `protobuf:"zigzag64,6,opt,name=single_sint64,json=singleSint64" json:"single_sint64,omitempty"` + SingleFixed32 uint32 `protobuf:"fixed32,7,opt,name=single_fixed32,json=singleFixed32" json:"single_fixed32,omitempty"` + SingleFixed64 uint64 `protobuf:"fixed64,8,opt,name=single_fixed64,json=singleFixed64" json:"single_fixed64,omitempty"` + SingleSfixed32 int32 `protobuf:"fixed32,9,opt,name=single_sfixed32,json=singleSfixed32" json:"single_sfixed32,omitempty"` + SingleSfixed64 int64 `protobuf:"fixed64,10,opt,name=single_sfixed64,json=singleSfixed64" json:"single_sfixed64,omitempty"` + SingleFloat float32 `protobuf:"fixed32,11,opt,name=single_float,json=singleFloat" json:"single_float,omitempty"` + SingleDouble float64 `protobuf:"fixed64,12,opt,name=single_double,json=singleDouble" json:"single_double,omitempty"` + SingleBool bool `protobuf:"varint,13,opt,name=single_bool,json=singleBool" json:"single_bool,omitempty"` + SingleString string `protobuf:"bytes,14,opt,name=single_string,json=singleString" json:"single_string,omitempty"` + SingleBytes []byte `protobuf:"bytes,15,opt,name=single_bytes,json=singleBytes,proto3" json:"single_bytes,omitempty"` + SingleImportedMessage *multitest2.Multi1 `protobuf:"bytes,16,opt,name=single_imported_message,json=singleImportedMessage" json:"single_imported_message,omitempty"` + SingleNestedMessage *TestAllTypes_NestedMessage `protobuf:"bytes,18,opt,name=single_nested_message,json=singleNestedMessage" json:"single_nested_message,omitempty"` + SingleForeignMessage *ForeignMessage `protobuf:"bytes,19,opt,name=single_foreign_message,json=singleForeignMessage" json:"single_foreign_message,omitempty"` + SingleNestedEnum TestAllTypes_NestedEnum `protobuf:"varint,21,opt,name=single_nested_enum,json=singleNestedEnum,enum=types.TestAllTypes_NestedEnum" json:"single_nested_enum,omitempty"` + SingleForeignEnum ForeignEnum `protobuf:"varint,22,opt,name=single_foreign_enum,json=singleForeignEnum,enum=types.ForeignEnum" json:"single_foreign_enum,omitempty"` + // Repeated + RepeatedInt32 []int32 `protobuf:"varint,31,rep,packed,name=repeated_int32,json=repeatedInt32" json:"repeated_int32,omitempty"` + RepeatedInt64 []int64 `protobuf:"varint,32,rep,packed,name=repeated_int64,json=repeatedInt64" json:"repeated_int64,omitempty"` + RepeatedUint32 []uint32 `protobuf:"varint,33,rep,packed,name=repeated_uint32,json=repeatedUint32" json:"repeated_uint32,omitempty"` + RepeatedUint64 []uint64 `protobuf:"varint,34,rep,packed,name=repeated_uint64,json=repeatedUint64" json:"repeated_uint64,omitempty"` + RepeatedSint32 []int32 `protobuf:"zigzag32,35,rep,packed,name=repeated_sint32,json=repeatedSint32" json:"repeated_sint32,omitempty"` + RepeatedSint64 []int64 `protobuf:"zigzag64,36,rep,packed,name=repeated_sint64,json=repeatedSint64" json:"repeated_sint64,omitempty"` + RepeatedFixed32 []uint32 `protobuf:"fixed32,37,rep,packed,name=repeated_fixed32,json=repeatedFixed32" json:"repeated_fixed32,omitempty"` + RepeatedFixed64 []uint64 `protobuf:"fixed64,38,rep,packed,name=repeated_fixed64,json=repeatedFixed64" json:"repeated_fixed64,omitempty"` + RepeatedSfixed32 []int32 `protobuf:"fixed32,39,rep,packed,name=repeated_sfixed32,json=repeatedSfixed32" json:"repeated_sfixed32,omitempty"` + RepeatedSfixed64 []int64 `protobuf:"fixed64,40,rep,packed,name=repeated_sfixed64,json=repeatedSfixed64" json:"repeated_sfixed64,omitempty"` + RepeatedFloat []float32 `protobuf:"fixed32,41,rep,packed,name=repeated_float,json=repeatedFloat" json:"repeated_float,omitempty"` + RepeatedDouble []float64 `protobuf:"fixed64,42,rep,packed,name=repeated_double,json=repeatedDouble" json:"repeated_double,omitempty"` + RepeatedBool []bool `protobuf:"varint,43,rep,packed,name=repeated_bool,json=repeatedBool" json:"repeated_bool,omitempty"` + RepeatedString []string `protobuf:"bytes,44,rep,name=repeated_string,json=repeatedString" json:"repeated_string,omitempty"` + RepeatedBytes [][]byte `protobuf:"bytes,45,rep,name=repeated_bytes,json=repeatedBytes,proto3" json:"repeated_bytes,omitempty"` + RepeatedImportedMessage []*multitest2.Multi1 `protobuf:"bytes,46,rep,name=repeated_imported_message,json=repeatedImportedMessage" json:"repeated_imported_message,omitempty"` + RepeatedNestedMessage []*TestAllTypes_NestedMessage `protobuf:"bytes,48,rep,name=repeated_nested_message,json=repeatedNestedMessage" json:"repeated_nested_message,omitempty"` + RepeatedForeignMessage []*ForeignMessage `protobuf:"bytes,49,rep,name=repeated_foreign_message,json=repeatedForeignMessage" json:"repeated_foreign_message,omitempty"` + RepeatedNestedEnum []TestAllTypes_NestedEnum `protobuf:"varint,51,rep,packed,name=repeated_nested_enum,json=repeatedNestedEnum,enum=types.TestAllTypes_NestedEnum" json:"repeated_nested_enum,omitempty"` + RepeatedForeignEnum []ForeignEnum `protobuf:"varint,52,rep,packed,name=repeated_foreign_enum,json=repeatedForeignEnum,enum=types.ForeignEnum" json:"repeated_foreign_enum,omitempty"` + // For oneof test + // + // Types that are valid to be assigned to OneofField: + // *TestAllTypes_OneofUint32 + // *TestAllTypes_OneofNestedMessage + // *TestAllTypes_OneofString + // *TestAllTypes_OneofBytes + // *TestAllTypes_OneofImportedMessage + OneofField isTestAllTypes_OneofField `protobuf_oneof:"oneof_field"` +} + +func (m *TestAllTypes) Reset() { *m = TestAllTypes{} } +func (m *TestAllTypes) String() string { return proto.CompactTextString(m) } +func (*TestAllTypes) ProtoMessage() {} +func (*TestAllTypes) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +type isTestAllTypes_OneofField interface { + isTestAllTypes_OneofField() +} + +type TestAllTypes_OneofUint32 struct { + OneofUint32 uint32 `protobuf:"varint,111,opt,name=oneof_uint32,json=oneofUint32,oneof"` +} +type TestAllTypes_OneofNestedMessage struct { + OneofNestedMessage *TestAllTypes_NestedMessage `protobuf:"bytes,112,opt,name=oneof_nested_message,json=oneofNestedMessage,oneof"` +} +type TestAllTypes_OneofString struct { + OneofString string `protobuf:"bytes,113,opt,name=oneof_string,json=oneofString,oneof"` +} +type TestAllTypes_OneofBytes struct { + OneofBytes []byte `protobuf:"bytes,114,opt,name=oneof_bytes,json=oneofBytes,proto3,oneof"` +} +type TestAllTypes_OneofImportedMessage struct { + OneofImportedMessage *multitest2.Multi1 `protobuf:"bytes,115,opt,name=oneof_imported_message,json=oneofImportedMessage,oneof"` +} + +func (*TestAllTypes_OneofUint32) isTestAllTypes_OneofField() {} +func (*TestAllTypes_OneofNestedMessage) isTestAllTypes_OneofField() {} +func (*TestAllTypes_OneofString) isTestAllTypes_OneofField() {} +func (*TestAllTypes_OneofBytes) isTestAllTypes_OneofField() {} +func (*TestAllTypes_OneofImportedMessage) isTestAllTypes_OneofField() {} + +func (m *TestAllTypes) GetOneofField() isTestAllTypes_OneofField { + if m != nil { + return m.OneofField + } + return nil +} + +func (m *TestAllTypes) GetSingleInt32() int32 { + if m != nil { + return m.SingleInt32 + } + return 0 +} + +func (m *TestAllTypes) GetSingleInt64() int64 { + if m != nil { + return m.SingleInt64 + } + return 0 +} + +func (m *TestAllTypes) GetSingleUint32() uint32 { + if m != nil { + return m.SingleUint32 + } + return 0 +} + +func (m *TestAllTypes) GetSingleUint64() uint64 { + if m != nil { + return m.SingleUint64 + } + return 0 +} + +func (m *TestAllTypes) GetSingleSint32() int32 { + if m != nil { + return m.SingleSint32 + } + return 0 +} + +func (m *TestAllTypes) GetSingleSint64() int64 { + if m != nil { + return m.SingleSint64 + } + return 0 +} + +func (m *TestAllTypes) GetSingleFixed32() uint32 { + if m != nil { + return m.SingleFixed32 + } + return 0 +} + +func (m *TestAllTypes) GetSingleFixed64() uint64 { + if m != nil { + return m.SingleFixed64 + } + return 0 +} + +func (m *TestAllTypes) GetSingleSfixed32() int32 { + if m != nil { + return m.SingleSfixed32 + } + return 0 +} + +func (m *TestAllTypes) GetSingleSfixed64() int64 { + if m != nil { + return m.SingleSfixed64 + } + return 0 +} + +func (m *TestAllTypes) GetSingleFloat() float32 { + if m != nil { + return m.SingleFloat + } + return 0 +} + +func (m *TestAllTypes) GetSingleDouble() float64 { + if m != nil { + return m.SingleDouble + } + return 0 +} + +func (m *TestAllTypes) GetSingleBool() bool { + if m != nil { + return m.SingleBool + } + return false +} + +func (m *TestAllTypes) GetSingleString() string { + if m != nil { + return m.SingleString + } + return "" +} + +func (m *TestAllTypes) GetSingleBytes() []byte { + if m != nil { + return m.SingleBytes + } + return nil +} + +func (m *TestAllTypes) GetSingleImportedMessage() *multitest2.Multi1 { + if m != nil { + return m.SingleImportedMessage + } + return nil +} + +func (m *TestAllTypes) GetSingleNestedMessage() *TestAllTypes_NestedMessage { + if m != nil { + return m.SingleNestedMessage + } + return nil +} + +func (m *TestAllTypes) GetSingleForeignMessage() *ForeignMessage { + if m != nil { + return m.SingleForeignMessage + } + return nil +} + +func (m *TestAllTypes) GetSingleNestedEnum() TestAllTypes_NestedEnum { + if m != nil { + return m.SingleNestedEnum + } + return TestAllTypes_NESTED_ENUM_UNSPECIFIED +} + +func (m *TestAllTypes) GetSingleForeignEnum() ForeignEnum { + if m != nil { + return m.SingleForeignEnum + } + return ForeignEnum_FOREIGN_UNSPECIFIED +} + +func (m *TestAllTypes) GetRepeatedInt32() []int32 { + if m != nil { + return m.RepeatedInt32 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedInt64() []int64 { + if m != nil { + return m.RepeatedInt64 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedUint32() []uint32 { + if m != nil { + return m.RepeatedUint32 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedUint64() []uint64 { + if m != nil { + return m.RepeatedUint64 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedSint32() []int32 { + if m != nil { + return m.RepeatedSint32 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedSint64() []int64 { + if m != nil { + return m.RepeatedSint64 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedFixed32() []uint32 { + if m != nil { + return m.RepeatedFixed32 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedFixed64() []uint64 { + if m != nil { + return m.RepeatedFixed64 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedSfixed32() []int32 { + if m != nil { + return m.RepeatedSfixed32 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedSfixed64() []int64 { + if m != nil { + return m.RepeatedSfixed64 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedFloat() []float32 { + if m != nil { + return m.RepeatedFloat + } + return nil +} + +func (m *TestAllTypes) GetRepeatedDouble() []float64 { + if m != nil { + return m.RepeatedDouble + } + return nil +} + +func (m *TestAllTypes) GetRepeatedBool() []bool { + if m != nil { + return m.RepeatedBool + } + return nil +} + +func (m *TestAllTypes) GetRepeatedString() []string { + if m != nil { + return m.RepeatedString + } + return nil +} + +func (m *TestAllTypes) GetRepeatedBytes() [][]byte { + if m != nil { + return m.RepeatedBytes + } + return nil +} + +func (m *TestAllTypes) GetRepeatedImportedMessage() []*multitest2.Multi1 { + if m != nil { + return m.RepeatedImportedMessage + } + return nil +} + +func (m *TestAllTypes) GetRepeatedNestedMessage() []*TestAllTypes_NestedMessage { + if m != nil { + return m.RepeatedNestedMessage + } + return nil +} + +func (m *TestAllTypes) GetRepeatedForeignMessage() []*ForeignMessage { + if m != nil { + return m.RepeatedForeignMessage + } + return nil +} + +func (m *TestAllTypes) GetRepeatedNestedEnum() []TestAllTypes_NestedEnum { + if m != nil { + return m.RepeatedNestedEnum + } + return nil +} + +func (m *TestAllTypes) GetRepeatedForeignEnum() []ForeignEnum { + if m != nil { + return m.RepeatedForeignEnum + } + return nil +} + +func (m *TestAllTypes) GetOneofUint32() uint32 { + if x, ok := m.GetOneofField().(*TestAllTypes_OneofUint32); ok { + return x.OneofUint32 + } + return 0 +} + +func (m *TestAllTypes) GetOneofNestedMessage() *TestAllTypes_NestedMessage { + if x, ok := m.GetOneofField().(*TestAllTypes_OneofNestedMessage); ok { + return x.OneofNestedMessage + } + return nil +} + +func (m *TestAllTypes) GetOneofString() string { + if x, ok := m.GetOneofField().(*TestAllTypes_OneofString); ok { + return x.OneofString + } + return "" +} + +func (m *TestAllTypes) GetOneofBytes() []byte { + if x, ok := m.GetOneofField().(*TestAllTypes_OneofBytes); ok { + return x.OneofBytes + } + return nil +} + +func (m *TestAllTypes) GetOneofImportedMessage() *multitest2.Multi1 { + if x, ok := m.GetOneofField().(*TestAllTypes_OneofImportedMessage); ok { + return x.OneofImportedMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*TestAllTypes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _TestAllTypes_OneofMarshaler, _TestAllTypes_OneofUnmarshaler, _TestAllTypes_OneofSizer, []interface{}{ + (*TestAllTypes_OneofUint32)(nil), + (*TestAllTypes_OneofNestedMessage)(nil), + (*TestAllTypes_OneofString)(nil), + (*TestAllTypes_OneofBytes)(nil), + (*TestAllTypes_OneofImportedMessage)(nil), + } +} + +func _TestAllTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*TestAllTypes) + // oneof_field + switch x := m.OneofField.(type) { + case *TestAllTypes_OneofUint32: + b.EncodeVarint(111<<3 | proto.WireVarint) + b.EncodeVarint(uint64(x.OneofUint32)) + case *TestAllTypes_OneofNestedMessage: + b.EncodeVarint(112<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.OneofNestedMessage); err != nil { + return err + } + case *TestAllTypes_OneofString: + b.EncodeVarint(113<<3 | proto.WireBytes) + b.EncodeStringBytes(x.OneofString) + case *TestAllTypes_OneofBytes: + b.EncodeVarint(114<<3 | proto.WireBytes) + b.EncodeRawBytes(x.OneofBytes) + case *TestAllTypes_OneofImportedMessage: + b.EncodeVarint(115<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.OneofImportedMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("TestAllTypes.OneofField has unexpected type %T", x) + } + return nil +} + +func _TestAllTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*TestAllTypes) + switch tag { + case 111: // oneof_field.oneof_uint32 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.OneofField = &TestAllTypes_OneofUint32{uint32(x)} + return true, err + case 112: // oneof_field.oneof_nested_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(TestAllTypes_NestedMessage) + err := b.DecodeMessage(msg) + m.OneofField = &TestAllTypes_OneofNestedMessage{msg} + return true, err + case 113: // oneof_field.oneof_string + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.OneofField = &TestAllTypes_OneofString{x} + return true, err + case 114: // oneof_field.oneof_bytes + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.OneofField = &TestAllTypes_OneofBytes{x} + return true, err + case 115: // oneof_field.oneof_imported_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(multitest2.Multi1) + err := b.DecodeMessage(msg) + m.OneofField = &TestAllTypes_OneofImportedMessage{msg} + return true, err + default: + return false, nil + } +} + +func _TestAllTypes_OneofSizer(msg proto.Message) (n int) { + m := msg.(*TestAllTypes) + // oneof_field + switch x := m.OneofField.(type) { + case *TestAllTypes_OneofUint32: + n += proto.SizeVarint(111<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.OneofUint32)) + case *TestAllTypes_OneofNestedMessage: + s := proto.Size(x.OneofNestedMessage) + n += proto.SizeVarint(112<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *TestAllTypes_OneofString: + n += proto.SizeVarint(113<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.OneofString))) + n += len(x.OneofString) + case *TestAllTypes_OneofBytes: + n += proto.SizeVarint(114<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.OneofBytes))) + n += len(x.OneofBytes) + case *TestAllTypes_OneofImportedMessage: + s := proto.Size(x.OneofImportedMessage) + n += proto.SizeVarint(115<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type TestAllTypes_NestedMessage struct { + B int32 `protobuf:"varint,1,opt,name=b" json:"b,omitempty"` +} + +func (m *TestAllTypes_NestedMessage) Reset() { *m = TestAllTypes_NestedMessage{} } +func (m *TestAllTypes_NestedMessage) String() string { return proto.CompactTextString(m) } +func (*TestAllTypes_NestedMessage) ProtoMessage() {} +func (*TestAllTypes_NestedMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} } + +func (m *TestAllTypes_NestedMessage) GetB() int32 { + if m != nil { + return m.B + } + return 0 +} + +// This proto includes a recusively nested message. +type NestedTestAllTypes struct { + Child *NestedTestAllTypes `protobuf:"bytes,1,opt,name=child" json:"child,omitempty"` + Payload *TestAllTypes `protobuf:"bytes,2,opt,name=payload" json:"payload,omitempty"` + RepeatedChild []*NestedTestAllTypes `protobuf:"bytes,3,rep,name=repeated_child,json=repeatedChild" json:"repeated_child,omitempty"` +} + +func (m *NestedTestAllTypes) Reset() { *m = NestedTestAllTypes{} } +func (m *NestedTestAllTypes) String() string { return proto.CompactTextString(m) } +func (*NestedTestAllTypes) ProtoMessage() {} +func (*NestedTestAllTypes) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +func (m *NestedTestAllTypes) GetChild() *NestedTestAllTypes { + if m != nil { + return m.Child + } + return nil +} + +func (m *NestedTestAllTypes) GetPayload() *TestAllTypes { + if m != nil { + return m.Payload + } + return nil +} + +func (m *NestedTestAllTypes) GetRepeatedChild() []*NestedTestAllTypes { + if m != nil { + return m.RepeatedChild + } + return nil +} + +// Define these after TestAllTypes to make sure the compiler can handle +// that. +type ForeignMessage struct { + C int32 `protobuf:"varint,1,opt,name=c" json:"c,omitempty"` +} + +func (m *ForeignMessage) Reset() { *m = ForeignMessage{} } +func (m *ForeignMessage) String() string { return proto.CompactTextString(m) } +func (*ForeignMessage) ProtoMessage() {} +func (*ForeignMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } + +func (m *ForeignMessage) GetC() int32 { + if m != nil { + return m.C + } + return 0 +} + +// Tests maps. +type TestMap struct { + MapInt32Int32 map[int32]int32 `protobuf:"bytes,1,rep,name=map_int32_int32,json=mapInt32Int32" json:"map_int32_int32,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapInt64Int64 map[int64]int64 `protobuf:"bytes,2,rep,name=map_int64_int64,json=mapInt64Int64" json:"map_int64_int64,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapUint32Uint32 map[uint32]uint32 `protobuf:"bytes,3,rep,name=map_uint32_uint32,json=mapUint32Uint32" json:"map_uint32_uint32,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapUint64Uint64 map[uint64]uint64 `protobuf:"bytes,4,rep,name=map_uint64_uint64,json=mapUint64Uint64" json:"map_uint64_uint64,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapSint32Sint32 map[int32]int32 `protobuf:"bytes,5,rep,name=map_sint32_sint32,json=mapSint32Sint32" json:"map_sint32_sint32,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + MapSint64Sint64 map[int64]int64 `protobuf:"bytes,6,rep,name=map_sint64_sint64,json=mapSint64Sint64" json:"map_sint64_sint64,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + MapFixed32Fixed32 map[uint32]uint32 `protobuf:"bytes,7,rep,name=map_fixed32_fixed32,json=mapFixed32Fixed32" json:"map_fixed32_fixed32,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + MapFixed64Fixed64 map[uint64]uint64 `protobuf:"bytes,8,rep,name=map_fixed64_fixed64,json=mapFixed64Fixed64" json:"map_fixed64_fixed64,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + MapSfixed32Sfixed32 map[int32]int32 `protobuf:"bytes,9,rep,name=map_sfixed32_sfixed32,json=mapSfixed32Sfixed32" json:"map_sfixed32_sfixed32,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + MapSfixed64Sfixed64 map[int64]int64 `protobuf:"bytes,10,rep,name=map_sfixed64_sfixed64,json=mapSfixed64Sfixed64" json:"map_sfixed64_sfixed64,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + MapInt32Float map[int32]float32 `protobuf:"bytes,11,rep,name=map_int32_float,json=mapInt32Float" json:"map_int32_float,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + MapInt32Double map[int32]float64 `protobuf:"bytes,12,rep,name=map_int32_double,json=mapInt32Double" json:"map_int32_double,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + MapBoolBool map[bool]bool `protobuf:"bytes,13,rep,name=map_bool_bool,json=mapBoolBool" json:"map_bool_bool,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapStringString map[string]string `protobuf:"bytes,14,rep,name=map_string_string,json=mapStringString" json:"map_string_string,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt32Bytes map[int32][]byte `protobuf:"bytes,15,rep,name=map_int32_bytes,json=mapInt32Bytes" json:"map_int32_bytes,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value,proto3"` + MapInt32Enum map[int32]MapEnum `protobuf:"bytes,16,rep,name=map_int32_enum,json=mapInt32Enum" json:"map_int32_enum,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=types.MapEnum"` + MapInt32ForeignMessage map[int32]*ForeignMessage `protobuf:"bytes,17,rep,name=map_int32_foreign_message,json=mapInt32ForeignMessage" json:"map_int32_foreign_message,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt32ImportedMessage map[int32]*multitest2.Multi1 `protobuf:"bytes,18,rep,name=map_int32_imported_message,json=mapInt32ImportedMessage" json:"map_int32_imported_message,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *TestMap) Reset() { *m = TestMap{} } +func (m *TestMap) String() string { return proto.CompactTextString(m) } +func (*TestMap) ProtoMessage() {} +func (*TestMap) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } + +func (m *TestMap) GetMapInt32Int32() map[int32]int32 { + if m != nil { + return m.MapInt32Int32 + } + return nil +} + +func (m *TestMap) GetMapInt64Int64() map[int64]int64 { + if m != nil { + return m.MapInt64Int64 + } + return nil +} + +func (m *TestMap) GetMapUint32Uint32() map[uint32]uint32 { + if m != nil { + return m.MapUint32Uint32 + } + return nil +} + +func (m *TestMap) GetMapUint64Uint64() map[uint64]uint64 { + if m != nil { + return m.MapUint64Uint64 + } + return nil +} + +func (m *TestMap) GetMapSint32Sint32() map[int32]int32 { + if m != nil { + return m.MapSint32Sint32 + } + return nil +} + +func (m *TestMap) GetMapSint64Sint64() map[int64]int64 { + if m != nil { + return m.MapSint64Sint64 + } + return nil +} + +func (m *TestMap) GetMapFixed32Fixed32() map[uint32]uint32 { + if m != nil { + return m.MapFixed32Fixed32 + } + return nil +} + +func (m *TestMap) GetMapFixed64Fixed64() map[uint64]uint64 { + if m != nil { + return m.MapFixed64Fixed64 + } + return nil +} + +func (m *TestMap) GetMapSfixed32Sfixed32() map[int32]int32 { + if m != nil { + return m.MapSfixed32Sfixed32 + } + return nil +} + +func (m *TestMap) GetMapSfixed64Sfixed64() map[int64]int64 { + if m != nil { + return m.MapSfixed64Sfixed64 + } + return nil +} + +func (m *TestMap) GetMapInt32Float() map[int32]float32 { + if m != nil { + return m.MapInt32Float + } + return nil +} + +func (m *TestMap) GetMapInt32Double() map[int32]float64 { + if m != nil { + return m.MapInt32Double + } + return nil +} + +func (m *TestMap) GetMapBoolBool() map[bool]bool { + if m != nil { + return m.MapBoolBool + } + return nil +} + +func (m *TestMap) GetMapStringString() map[string]string { + if m != nil { + return m.MapStringString + } + return nil +} + +func (m *TestMap) GetMapInt32Bytes() map[int32][]byte { + if m != nil { + return m.MapInt32Bytes + } + return nil +} + +func (m *TestMap) GetMapInt32Enum() map[int32]MapEnum { + if m != nil { + return m.MapInt32Enum + } + return nil +} + +func (m *TestMap) GetMapInt32ForeignMessage() map[int32]*ForeignMessage { + if m != nil { + return m.MapInt32ForeignMessage + } + return nil +} + +func (m *TestMap) GetMapInt32ImportedMessage() map[int32]*multitest2.Multi1 { + if m != nil { + return m.MapInt32ImportedMessage + } + return nil +} + +func init() { + proto.RegisterType((*TestAllTypes)(nil), "types.TestAllTypes") + proto.RegisterType((*TestAllTypes_NestedMessage)(nil), "types.TestAllTypes.NestedMessage") + proto.RegisterType((*NestedTestAllTypes)(nil), "types.NestedTestAllTypes") + proto.RegisterType((*ForeignMessage)(nil), "types.ForeignMessage") + proto.RegisterType((*TestMap)(nil), "types.TestMap") + proto.RegisterEnum("types.ForeignEnum", ForeignEnum_name, ForeignEnum_value) + proto.RegisterEnum("types.MapEnum", MapEnum_name, MapEnum_value) + proto.RegisterEnum("types.TestAllTypes_NestedEnum", TestAllTypes_NestedEnum_name, TestAllTypes_NestedEnum_value) +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// Client API for EchoService service + +type EchoServiceClient interface { + EchoAllTypes(ctx context.Context, in *TestAllTypes, opts ...grpc.CallOption) (*TestAllTypes, error) + EchoMaps(ctx context.Context, in *TestMap, opts ...grpc.CallOption) (*TestMap, error) +} + +type echoServiceClient struct { + cc *grpc.ClientConn +} + +func NewEchoServiceClient(cc *grpc.ClientConn) EchoServiceClient { + return &echoServiceClient{cc} +} + +func (c *echoServiceClient) EchoAllTypes(ctx context.Context, in *TestAllTypes, opts ...grpc.CallOption) (*TestAllTypes, error) { + out := new(TestAllTypes) + err := grpc.Invoke(ctx, "/types.EchoService/EchoAllTypes", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *echoServiceClient) EchoMaps(ctx context.Context, in *TestMap, opts ...grpc.CallOption) (*TestMap, error) { + out := new(TestMap) + err := grpc.Invoke(ctx, "/types.EchoService/EchoMaps", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for EchoService service + +type EchoServiceServer interface { + EchoAllTypes(context.Context, *TestAllTypes) (*TestAllTypes, error) + EchoMaps(context.Context, *TestMap) (*TestMap, error) +} + +func RegisterEchoServiceServer(s *grpc.Server, srv EchoServiceServer) { + s.RegisterService(&_EchoService_serviceDesc, srv) +} + +func _EchoService_EchoAllTypes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TestAllTypes) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EchoServiceServer).EchoAllTypes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/types.EchoService/EchoAllTypes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EchoServiceServer).EchoAllTypes(ctx, req.(*TestAllTypes)) + } + return interceptor(ctx, in, info, handler) +} + +func _EchoService_EchoMaps_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TestMap) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EchoServiceServer).EchoMaps(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/types.EchoService/EchoMaps", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EchoServiceServer).EchoMaps(ctx, req.(*TestMap)) + } + return interceptor(ctx, in, info, handler) +} + +var _EchoService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "types.EchoService", + HandlerType: (*EchoServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "EchoAllTypes", + Handler: _EchoService_EchoAllTypes_Handler, + }, + { + MethodName: "EchoMaps", + Handler: _EchoService_EchoMaps_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "types/types.proto", +} + +func init() { proto.RegisterFile("types/types.proto", fileDescriptor0) } + +var fileDescriptor0 = []byte{ + // 1697 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x98, 0xfb, 0x52, 0xdb, 0xc6, + 0x17, 0xc7, 0x2d, 0x84, 0x31, 0x1c, 0xdf, 0xe4,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xaf, 0xa9, 0x45, 0x28, + 0x5b, 0xd1, 0x19, 0x94, 0x29, 0x50, 0x74, 0x3a, 0x69, 0x9b, 0x4c, 0x91, 0x9b, 0x93, 0x48, 0xd1, + 0x6a, 0xc5, 0x07, 0x87, 0xd2, 0x90, 0x54, 0xbb, 0x82, 0xf5, 0x3d, 0x69, 0x5b, 0x3d, 0x0b, 0xeb, + 0x7b, 0xe2, 0x43, 0xc3, 0xc6, 0x76, 0xf4, 0x33, 0xac, 0xb0, 0xc7, 0x8f, 0xc2, 0x95, 0xf6, 0xe1, + 0x14, 0xbc, 0x65, 0x58, 0x02, 0xe1, 0x11, 0x7d, 0x72, 0x34, 0x0d, 0x4e, 0xbf, 0xa3, 0xc2, 0xe9, + 0xea, 0x26, 0x7b, 0xf7, 0x99, 0x70, 0xdf, 0x8b, 0x3e, 0x75, 0x78, 0x72, 0x47, 0x55, 0x50, 0xb4, + 0xd9, 0x9f, 0xa5, 0x20, 0xb6, 0x4b, 0xd0, 0x14, 0xc4, 0x77, 0x0e, 0x6f, 0xc1, 0x49, 0x50, 0xf1, + 0xa1, 0x80, 0xb2, 0x2a, 0x53, 0x58, 0x7c, 0x27, 0xc1, 0x61, 0x85, 0xae, 0x62, 0x44, 0xaf, 0x81, + 0xe2, 0xd9, 0xce, 0x22, 0x3a, 0x3c, 0x50, 0xd4, 0xc3, 0x49, 0x14, 0xdd, 0x68, 0xd0, 0xff, 0x9c, + 0x93, 0xed, 0x26, 0x96, 0x38, 0x2d, 0x59, 0x1b, 0x48, 0x8e, 0x18, 0xd3, 0xd2, 0x92, 0xdd, 0xe7, + 0x57, 0x29, 0x2d, 0x25, 0xab, 0xba, 0x5c, 0xd1, 0x69, 0x64, 0xd6, 0x72, 0xb1, 0xee, 0xa2, 0x2d, + 0x17, 0xef, 0x38, 0x75, 0x28, 0x24, 0x28, 0xd6, 0x76, 0x1d, 0x46, 0xc2, 0x53, 0x48, 0xb4, 0x5d, + 0x70, 0x50, 0xae, 0x2b, 0x99, 0x50, 0x08, 0xf7, 0xa4, 0x37, 0xa8, 0xed, 0x34, 0x4a, 0x0c, 0xb9, + 0x3d, 0xed, 0x5d, 0x2a, 0x75, 0x96, 0xc3, 0x57, 0xbb, 0xc6, 0x9b, 0xe8, 0x13, 0xac, 0x4b, 0xa5, + 0x56, 0x6f, 0x92, 0x88, 0xcd, 0xb3, 0x33, 0xad, 0xea, 0xaa, 0x1d, 0x92, 0x4f, 0xb4, 0xd6, 0x35, + 0xdf, 0x5d, 0x7f, 0x05, 0x68, 0xb2, 0x5c, 0xd3, 0x86, 0xf7, 0x5b, 0x78, 0x27, 0xda, 0x00, 0xfd, + 0x8a, 0x96, 0x21, 0xfd, 0xb9, 0xd5, 0xb9, 0x0d, 0x59, 0x5f, 0x4a, 0x07, 0xfc, 0xc7, 0xcb, 0xb9, + 0xef, 0xac, 0x84, 0x20, 0x57, 0x69, 0x99, 0x60, 0x1b, 0x08, 0xb6, 0x4c, 0x38, 0x80, 0x65, 0x53, + 0x69, 0x96, 0x19, 0x79, 0x03, 0x23, 0x6f, 0x66, 0x28, 0xd5, 0x58, 0x66, 0xcc, 0x1b, 0x18, 0xf3, + 0x93, 0x8c, 0x89, 0x02, 0x2c, 0x33, 0x4a, 0x06, 0x46, 0xc9, 0xcc, 0x50, 0x6a, 0xae, 0xcc, 0x40, + 0x06, 0x06, 0x92, 0x19, 0x87, 0xb0, 0x6a, 0x2e, 0xb2, 0x32, 0x25, 0x63, 0xa0, 0x64, 0xa6, 0x50, + 0xd4, 0x9a, 0x2a, 0x53, 0x16, 0x0c, 0x94, 0x05, 0x99, 0x52, 0x07, 0x77, 0x5a, 0x01, 0x95, 0x39, + 0x45, 0x03, 0xa7, 0x38, 0x8d, 0xa3, 0xd5, 0x4a, 0x99, 0xe3, 0x18, 0x38, 0x8e, 0x31, 0xdb, 0xe4, + 0xe2, 0xf8, 0xa5, 0x7c, 0x9d, 0x93, 0x09, 0xfb, 0x50, 0x36, 0x94, 0xc4, 0x2f, 0x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