github.com/syumai/protoreflect@v1.7.1-0.20200810020253-2ac7e3b3a321/internal/testprotos/desc_test_comments.pb.go (about) 1 // This is the first detached comment for the syntax. 2 3 // 4 // This is a second detached comment. 5 6 // This is a third. 7 8 // Syntax comment... 9 10 // Code generated by protoc-gen-go. DO NOT EDIT. 11 // versions: 12 // protoc-gen-go v1.25.0 13 // protoc v3.12.0 14 // source: desc_test_comments.proto 15 16 // And now the package declaration 17 18 package testprotos 19 20 import ( 21 context "context" 22 proto "github.com/golang/protobuf/proto" 23 empty "github.com/golang/protobuf/ptypes/empty" 24 grpc "google.golang.org/grpc" 25 codes "google.golang.org/grpc/codes" 26 status "google.golang.org/grpc/status" 27 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 28 protoiface "google.golang.org/protobuf/runtime/protoiface" 29 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 30 reflect "reflect" 31 sync "sync" 32 ) 33 34 const ( 35 // Verify that this generated code is sufficiently up-to-date. 36 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 37 // Verify that runtime/protoimpl is sufficiently up-to-date. 38 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 39 ) 40 41 // This is a compile-time assertion that a sufficiently up-to-date version 42 // of the legacy proto package is being used. 43 const _ = proto.ProtoPackageIsVersion4 44 45 type Request_MarioCharacters int32 46 47 const ( 48 Request_MARIO Request_MarioCharacters = 1 49 Request_LUIGI Request_MarioCharacters = 2 50 Request_PEACH Request_MarioCharacters = 3 51 Request_BOWSER Request_MarioCharacters = 4 52 Request_WARIO Request_MarioCharacters = 5 53 Request_WALUIGI Request_MarioCharacters = 6 54 Request_SHY_GUY Request_MarioCharacters = 7 55 Request_HEY_HO Request_MarioCharacters = 7 56 Request_MAGIKOOPA Request_MarioCharacters = 8 57 Request_KAMEK Request_MarioCharacters = 8 58 Request_SNIFIT Request_MarioCharacters = -101 59 ) 60 61 // Enum value maps for Request_MarioCharacters. 62 var ( 63 Request_MarioCharacters_name = map[int32]string{ 64 1: "MARIO", 65 2: "LUIGI", 66 3: "PEACH", 67 4: "BOWSER", 68 5: "WARIO", 69 6: "WALUIGI", 70 7: "SHY_GUY", 71 // Duplicate value: 7: "HEY_HO", 72 8: "MAGIKOOPA", 73 // Duplicate value: 8: "KAMEK", 74 -101: "SNIFIT", 75 } 76 Request_MarioCharacters_value = map[string]int32{ 77 "MARIO": 1, 78 "LUIGI": 2, 79 "PEACH": 3, 80 "BOWSER": 4, 81 "WARIO": 5, 82 "WALUIGI": 6, 83 "SHY_GUY": 7, 84 "HEY_HO": 7, 85 "MAGIKOOPA": 8, 86 "KAMEK": 8, 87 "SNIFIT": -101, 88 } 89 ) 90 91 func (x Request_MarioCharacters) Enum() *Request_MarioCharacters { 92 p := new(Request_MarioCharacters) 93 *p = x 94 return p 95 } 96 97 func (x Request_MarioCharacters) String() string { 98 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 99 } 100 101 func (Request_MarioCharacters) Descriptor() protoreflect.EnumDescriptor { 102 return file_desc_test_comments_proto_enumTypes[0].Descriptor() 103 } 104 105 func (Request_MarioCharacters) Type() protoreflect.EnumType { 106 return &file_desc_test_comments_proto_enumTypes[0] 107 } 108 109 func (x Request_MarioCharacters) Number() protoreflect.EnumNumber { 110 return protoreflect.EnumNumber(x) 111 } 112 113 // Deprecated: Do not use. 114 func (x *Request_MarioCharacters) UnmarshalJSON(b []byte) error { 115 num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) 116 if err != nil { 117 return err 118 } 119 *x = Request_MarioCharacters(num) 120 return nil 121 } 122 123 // Deprecated: Use Request_MarioCharacters.Descriptor instead. 124 func (Request_MarioCharacters) EnumDescriptor() ([]byte, []int) { 125 return file_desc_test_comments_proto_rawDescGZIP(), []int{0, 0} 126 } 127 128 // We need a request for our RPC service below. 129 // 130 // Deprecated: Do not use. 131 type Request struct { 132 state protoimpl.MessageState 133 sizeCache protoimpl.SizeCache 134 unknownFields protoimpl.UnknownFields 135 extensionFields protoimpl.ExtensionFields 136 137 // A field comment 138 Ids []int32 `protobuf:"varint,1,rep,packed,name=ids,json=|foo|" json:"ids,omitempty"` // field trailer #1... 139 // label comment 140 Name *string `protobuf:"bytes,2,opt,name=name,def=fubar" json:"name,omitempty"` 141 Extras *Request_Extras `protobuf:"group,3,opt,name=Extras,json=extras" json:"extras,omitempty"` 142 // can be this or that 143 // 144 // Types that are assignable to Abc: 145 // *Request_This 146 // *Request_That 147 Abc isRequest_Abc `protobuf_oneof:"abc"` 148 // can be these or those 149 // 150 // Types that are assignable to Xyz: 151 // *Request_These 152 // *Request_Those 153 Xyz isRequest_Xyz `protobuf_oneof:"xyz"` 154 // map field 155 Things map[string]string `protobuf:"bytes,8,rep,name=things" json:"things,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` 156 } 157 158 // Default values for Request fields. 159 const ( 160 Default_Request_Name = string("fubar") 161 ) 162 163 func (x *Request) Reset() { 164 *x = Request{} 165 if protoimpl.UnsafeEnabled { 166 mi := &file_desc_test_comments_proto_msgTypes[0] 167 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 168 ms.StoreMessageInfo(mi) 169 } 170 } 171 172 func (x *Request) String() string { 173 return protoimpl.X.MessageStringOf(x) 174 } 175 176 func (*Request) ProtoMessage() {} 177 178 func (x *Request) ProtoReflect() protoreflect.Message { 179 mi := &file_desc_test_comments_proto_msgTypes[0] 180 if protoimpl.UnsafeEnabled && x != nil { 181 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 182 if ms.LoadMessageInfo() == nil { 183 ms.StoreMessageInfo(mi) 184 } 185 return ms 186 } 187 return mi.MessageOf(x) 188 } 189 190 // Deprecated: Use Request.ProtoReflect.Descriptor instead. 191 func (*Request) Descriptor() ([]byte, []int) { 192 return file_desc_test_comments_proto_rawDescGZIP(), []int{0} 193 } 194 195 var extRange_Request = []protoiface.ExtensionRangeV1{ 196 {Start: 100, End: 200}, 197 {Start: 201, End: 250}, 198 } 199 200 // Deprecated: Use Request.ProtoReflect.Descriptor.ExtensionRanges instead. 201 func (*Request) ExtensionRangeArray() []protoiface.ExtensionRangeV1 { 202 return extRange_Request 203 } 204 205 func (x *Request) GetIds() []int32 { 206 if x != nil { 207 return x.Ids 208 } 209 return nil 210 } 211 212 func (x *Request) GetName() string { 213 if x != nil && x.Name != nil { 214 return *x.Name 215 } 216 return Default_Request_Name 217 } 218 219 func (x *Request) GetExtras() *Request_Extras { 220 if x != nil { 221 return x.Extras 222 } 223 return nil 224 } 225 226 func (m *Request) GetAbc() isRequest_Abc { 227 if m != nil { 228 return m.Abc 229 } 230 return nil 231 } 232 233 func (x *Request) GetThis() string { 234 if x, ok := x.GetAbc().(*Request_This); ok { 235 return x.This 236 } 237 return "" 238 } 239 240 func (x *Request) GetThat() int32 { 241 if x, ok := x.GetAbc().(*Request_That); ok { 242 return x.That 243 } 244 return 0 245 } 246 247 func (m *Request) GetXyz() isRequest_Xyz { 248 if m != nil { 249 return m.Xyz 250 } 251 return nil 252 } 253 254 func (x *Request) GetThese() string { 255 if x, ok := x.GetXyz().(*Request_These); ok { 256 return x.These 257 } 258 return "" 259 } 260 261 func (x *Request) GetThose() int32 { 262 if x, ok := x.GetXyz().(*Request_Those); ok { 263 return x.Those 264 } 265 return 0 266 } 267 268 func (x *Request) GetThings() map[string]string { 269 if x != nil { 270 return x.Things 271 } 272 return nil 273 } 274 275 type isRequest_Abc interface { 276 isRequest_Abc() 277 } 278 279 type Request_This struct { 280 This string `protobuf:"bytes,4,opt,name=this,oneof"` 281 } 282 283 type Request_That struct { 284 That int32 `protobuf:"varint,5,opt,name=that,oneof"` 285 } 286 287 func (*Request_This) isRequest_Abc() {} 288 289 func (*Request_That) isRequest_Abc() {} 290 291 type isRequest_Xyz interface { 292 isRequest_Xyz() 293 } 294 295 type Request_These struct { 296 These string `protobuf:"bytes,6,opt,name=these,oneof"` 297 } 298 299 type Request_Those struct { 300 Those int32 `protobuf:"varint,7,opt,name=those,oneof"` 301 } 302 303 func (*Request_These) isRequest_Xyz() {} 304 305 func (*Request_Those) isRequest_Xyz() {} 306 307 type AnEmptyMessage struct { 308 state protoimpl.MessageState 309 sizeCache protoimpl.SizeCache 310 unknownFields protoimpl.UnknownFields 311 } 312 313 func (x *AnEmptyMessage) Reset() { 314 *x = AnEmptyMessage{} 315 if protoimpl.UnsafeEnabled { 316 mi := &file_desc_test_comments_proto_msgTypes[1] 317 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 318 ms.StoreMessageInfo(mi) 319 } 320 } 321 322 func (x *AnEmptyMessage) String() string { 323 return protoimpl.X.MessageStringOf(x) 324 } 325 326 func (*AnEmptyMessage) ProtoMessage() {} 327 328 func (x *AnEmptyMessage) ProtoReflect() protoreflect.Message { 329 mi := &file_desc_test_comments_proto_msgTypes[1] 330 if protoimpl.UnsafeEnabled && x != nil { 331 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 332 if ms.LoadMessageInfo() == nil { 333 ms.StoreMessageInfo(mi) 334 } 335 return ms 336 } 337 return mi.MessageOf(x) 338 } 339 340 // Deprecated: Use AnEmptyMessage.ProtoReflect.Descriptor instead. 341 func (*AnEmptyMessage) Descriptor() ([]byte, []int) { 342 return file_desc_test_comments_proto_rawDescGZIP(), []int{1} 343 } 344 345 // Group comment 346 type Request_Extras struct { 347 state protoimpl.MessageState 348 sizeCache protoimpl.SizeCache 349 unknownFields protoimpl.UnknownFields 350 351 Dbl *float64 `protobuf:"fixed64,1,opt,name=dbl" json:"dbl,omitempty"` 352 Flt *float32 `protobuf:"fixed32,2,opt,name=flt" json:"flt,omitempty"` 353 // Leading comment... 354 Str *string `protobuf:"bytes,3,opt,name=str" json:"str,omitempty"` // Trailing comment... 355 } 356 357 func (x *Request_Extras) Reset() { 358 *x = Request_Extras{} 359 if protoimpl.UnsafeEnabled { 360 mi := &file_desc_test_comments_proto_msgTypes[2] 361 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 362 ms.StoreMessageInfo(mi) 363 } 364 } 365 366 func (x *Request_Extras) String() string { 367 return protoimpl.X.MessageStringOf(x) 368 } 369 370 func (*Request_Extras) ProtoMessage() {} 371 372 func (x *Request_Extras) ProtoReflect() protoreflect.Message { 373 mi := &file_desc_test_comments_proto_msgTypes[2] 374 if protoimpl.UnsafeEnabled && x != nil { 375 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 376 if ms.LoadMessageInfo() == nil { 377 ms.StoreMessageInfo(mi) 378 } 379 return ms 380 } 381 return mi.MessageOf(x) 382 } 383 384 // Deprecated: Use Request_Extras.ProtoReflect.Descriptor instead. 385 func (*Request_Extras) Descriptor() ([]byte, []int) { 386 return file_desc_test_comments_proto_rawDescGZIP(), []int{0, 0} 387 } 388 389 func (x *Request_Extras) GetDbl() float64 { 390 if x != nil && x.Dbl != nil { 391 return *x.Dbl 392 } 393 return 0 394 } 395 396 func (x *Request_Extras) GetFlt() float32 { 397 if x != nil && x.Flt != nil { 398 return *x.Flt 399 } 400 return 0 401 } 402 403 func (x *Request_Extras) GetStr() string { 404 if x != nil && x.Str != nil { 405 return *x.Str 406 } 407 return "" 408 } 409 410 var file_desc_test_comments_proto_extTypes = []protoimpl.ExtensionInfo{ 411 { 412 ExtendedType: (*Request)(nil), 413 ExtensionType: (*uint64)(nil), 414 Field: 123, 415 Name: "foo.bar.guid1", 416 Tag: "varint,123,opt,name=guid1", 417 Filename: "desc_test_comments.proto", 418 }, 419 { 420 ExtendedType: (*Request)(nil), 421 ExtensionType: (*uint64)(nil), 422 Field: 124, 423 Name: "foo.bar.guid2", 424 Tag: "varint,124,opt,name=guid2", 425 Filename: "desc_test_comments.proto", 426 }, 427 } 428 429 // Extension fields to Request. 430 var ( 431 // comment for guid1 432 // 433 // optional uint64 guid1 = 123; 434 E_Guid1 = &file_desc_test_comments_proto_extTypes[0] 435 // ... and a comment for guid2 436 // 437 // optional uint64 guid2 = 124; 438 E_Guid2 = &file_desc_test_comments_proto_extTypes[1] 439 ) 440 441 var File_desc_test_comments_proto protoreflect.FileDescriptor 442 443 var file_desc_test_comments_proto_rawDesc = []byte{ 444 0x0a, 0x18, 0x64, 0x65, 0x73, 0x63, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 445 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x66, 0x6f, 0x6f, 0x2e, 446 0x62, 0x61, 0x72, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 447 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 448 0x1a, 0x17, 0x64, 0x65, 0x73, 0x63, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 449 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc1, 0x05, 0x0a, 0x07, 0x52, 0x65, 450 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 451 0x28, 0x05, 0x42, 0x10, 0x10, 0x01, 0xaa, 0xf7, 0x04, 0x03, 0x61, 0x62, 0x63, 0xb2, 0xf7, 0x04, 452 0x03, 0x78, 0x79, 0x7a, 0x52, 0x05, 0x7c, 0x66, 0x6f, 0x6f, 0x7c, 0x12, 0x19, 0x0a, 0x04, 0x6e, 453 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x3a, 0x05, 0x66, 0x75, 0x62, 0x61, 0x72, 454 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x65, 0x78, 0x74, 0x72, 0x61, 0x73, 455 0x18, 0x03, 0x20, 0x01, 0x28, 0x0a, 0x32, 0x17, 0x2e, 0x66, 0x6f, 0x6f, 0x2e, 0x62, 0x61, 0x72, 456 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x73, 0x52, 457 0x06, 0x65, 0x78, 0x74, 0x72, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x04, 0x74, 0x68, 0x69, 0x73, 0x18, 458 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x74, 0x68, 0x69, 0x73, 0x12, 0x14, 0x0a, 459 0x04, 0x74, 0x68, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x04, 0x74, 460 0x68, 0x61, 0x74, 0x12, 0x16, 0x0a, 0x05, 0x74, 0x68, 0x65, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 461 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x74, 0x68, 0x65, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x05, 0x74, 462 0x68, 0x6f, 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52, 0x05, 0x74, 0x68, 463 0x6f, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x08, 0x20, 464 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x66, 0x6f, 0x6f, 0x2e, 0x62, 0x61, 0x72, 0x2e, 0x52, 0x65, 465 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 466 0x79, 0x52, 0x06, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x1a, 0x46, 0x0a, 0x06, 0x45, 0x78, 0x74, 467 0x72, 0x61, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x62, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 468 0x52, 0x03, 0x64, 0x62, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 469 0x28, 0x02, 0x52, 0x03, 0x66, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x74, 0x72, 0x18, 0x03, 470 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x74, 0x72, 0x3a, 0x06, 0x10, 0x00, 0xa8, 0xf7, 0x04, 471 0x00, 0x1a, 0x39, 0x0a, 0x0b, 0x54, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 472 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 473 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 474 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd6, 0x01, 0x0a, 475 0x0f, 0x4d, 0x61, 0x72, 0x69, 0x6f, 0x43, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x73, 476 0x12, 0x15, 0x0a, 0x05, 0x4d, 0x41, 0x52, 0x49, 0x4f, 0x10, 0x01, 0x1a, 0x0a, 0xb0, 0xf7, 0x04, 477 0xf3, 0x04, 0xa8, 0xf7, 0x04, 0x96, 0x02, 0x12, 0x1b, 0x0a, 0x05, 0x4c, 0x55, 0x49, 0x47, 0x49, 478 0x10, 0x02, 0x1a, 0x10, 0xc9, 0xf7, 0x04, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 479 0xf7, 0x04, 0xc8, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x45, 0x41, 0x43, 0x48, 0x10, 0x03, 0x12, 480 0x0a, 0x0a, 0x06, 0x42, 0x4f, 0x57, 0x53, 0x45, 0x52, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x57, 481 0x41, 0x52, 0x49, 0x4f, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, 0x4c, 0x55, 0x49, 0x47, 482 0x49, 0x10, 0x06, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x48, 0x59, 0x5f, 0x47, 0x55, 0x59, 0x10, 0x07, 483 0x1a, 0x0b, 0xb9, 0xf7, 0x04, 0x75, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x0a, 0x0a, 484 0x06, 0x48, 0x45, 0x59, 0x5f, 0x48, 0x4f, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x4d, 0x41, 0x47, 485 0x49, 0x4b, 0x4f, 0x4f, 0x50, 0x41, 0x10, 0x08, 0x12, 0x09, 0x0a, 0x05, 0x4b, 0x41, 0x4d, 0x45, 486 0x4b, 0x10, 0x08, 0x12, 0x13, 0x0a, 0x06, 0x53, 0x4e, 0x49, 0x46, 0x49, 0x54, 0x10, 0x9b, 0xff, 487 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x1a, 0x0b, 0x10, 0x01, 0xb0, 0xf7, 0x04, 0x81, 488 0x05, 0xa8, 0xf7, 0x04, 0x7b, 0x2a, 0x05, 0x08, 0x64, 0x10, 0xc9, 0x01, 0x2a, 0x1e, 0x08, 0xc9, 489 0x01, 0x10, 0xfb, 0x01, 0x1a, 0x16, 0xb2, 0xf7, 0x04, 0x08, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 490 0x06, 0x07, 0xaa, 0xf7, 0x04, 0x06, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x21, 0x3a, 0x06, 0x18, 0x01, 491 0xa8, 0xf7, 0x04, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x61, 0x62, 0x63, 0x42, 0x05, 0x0a, 0x03, 0x78, 492 0x79, 0x7a, 0x4a, 0x04, 0x08, 0x0a, 0x10, 0x15, 0x4a, 0x04, 0x08, 0x1e, 0x10, 0x33, 0x52, 0x03, 493 0x66, 0x6f, 0x6f, 0x52, 0x03, 0x62, 0x61, 0x72, 0x52, 0x03, 0x62, 0x61, 0x7a, 0x22, 0x10, 0x0a, 494 0x0e, 0x41, 0x6e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 495 0xa7, 0x01, 0x0a, 0x0a, 0x52, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x34, 496 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x70, 0x63, 0x12, 0x10, 497 0x2e, 0x66, 0x6f, 0x6f, 0x2e, 0x62, 0x61, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 498 0x1a, 0x10, 0x2e, 0x66, 0x6f, 0x6f, 0x2e, 0x62, 0x61, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 499 0x73, 0x74, 0x28, 0x01, 0x12, 0x4b, 0x0a, 0x08, 0x55, 0x6e, 0x61, 0x72, 0x79, 0x52, 0x70, 0x63, 500 0x12, 0x10, 0x2e, 0x66, 0x6f, 0x6f, 0x2e, 0x62, 0x61, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 501 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 502 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x15, 0x88, 0x02, 0x01, 0xad, 503 0xf7, 0x04, 0xa4, 0x70, 0x45, 0x41, 0xb1, 0xf7, 0x04, 0x77, 0xbe, 0x9f, 0x1a, 0x2f, 0xdd, 0x5e, 504 0x40, 0x1a, 0x16, 0x88, 0x02, 0x00, 0xaa, 0xf7, 0x04, 0x02, 0x08, 0x64, 0xaa, 0xf7, 0x04, 0x05, 505 0x12, 0x03, 0x62, 0x6f, 0x62, 0xb0, 0xf7, 0x04, 0x01, 0x3a, 0x26, 0x0a, 0x05, 0x67, 0x75, 0x69, 506 0x64, 0x31, 0x12, 0x10, 0x2e, 0x66, 0x6f, 0x6f, 0x2e, 0x62, 0x61, 0x72, 0x2e, 0x52, 0x65, 0x71, 507 0x75, 0x65, 0x73, 0x74, 0x18, 0x7b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x67, 0x75, 0x69, 0x64, 508 0x31, 0x3a, 0x26, 0x0a, 0x05, 0x67, 0x75, 0x69, 0x64, 0x32, 0x12, 0x10, 0x2e, 0x66, 0x6f, 0x6f, 509 0x2e, 0x62, 0x61, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x7c, 0x20, 0x01, 510 0x28, 0x04, 0x52, 0x05, 0x67, 0x75, 0x69, 0x64, 0x32, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 511 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x68, 0x75, 0x6d, 0x70, 0x2f, 0x70, 0x72, 512 0x6f, 0x74, 0x6f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 513 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 514 } 515 516 var ( 517 file_desc_test_comments_proto_rawDescOnce sync.Once 518 file_desc_test_comments_proto_rawDescData = file_desc_test_comments_proto_rawDesc 519 ) 520 521 func file_desc_test_comments_proto_rawDescGZIP() []byte { 522 file_desc_test_comments_proto_rawDescOnce.Do(func() { 523 file_desc_test_comments_proto_rawDescData = protoimpl.X.CompressGZIP(file_desc_test_comments_proto_rawDescData) 524 }) 525 return file_desc_test_comments_proto_rawDescData 526 } 527 528 var file_desc_test_comments_proto_enumTypes = make([]protoimpl.EnumInfo, 1) 529 var file_desc_test_comments_proto_msgTypes = make([]protoimpl.MessageInfo, 4) 530 var file_desc_test_comments_proto_goTypes = []interface{}{ 531 (Request_MarioCharacters)(0), // 0: foo.bar.Request.MarioCharacters 532 (*Request)(nil), // 1: foo.bar.Request 533 (*AnEmptyMessage)(nil), // 2: foo.bar.AnEmptyMessage 534 (*Request_Extras)(nil), // 3: foo.bar.Request.Extras 535 nil, // 4: foo.bar.Request.ThingsEntry 536 (*empty.Empty)(nil), // 5: google.protobuf.Empty 537 } 538 var file_desc_test_comments_proto_depIdxs = []int32{ 539 3, // 0: foo.bar.Request.extras:type_name -> foo.bar.Request.Extras 540 4, // 1: foo.bar.Request.things:type_name -> foo.bar.Request.ThingsEntry 541 1, // 2: foo.bar.guid1:extendee -> foo.bar.Request 542 1, // 3: foo.bar.guid2:extendee -> foo.bar.Request 543 1, // 4: foo.bar.RpcService.StreamingRpc:input_type -> foo.bar.Request 544 1, // 5: foo.bar.RpcService.UnaryRpc:input_type -> foo.bar.Request 545 1, // 6: foo.bar.RpcService.StreamingRpc:output_type -> foo.bar.Request 546 5, // 7: foo.bar.RpcService.UnaryRpc:output_type -> google.protobuf.Empty 547 6, // [6:8] is the sub-list for method output_type 548 4, // [4:6] is the sub-list for method input_type 549 4, // [4:4] is the sub-list for extension type_name 550 2, // [2:4] is the sub-list for extension extendee 551 0, // [0:2] is the sub-list for field type_name 552 } 553 554 func init() { file_desc_test_comments_proto_init() } 555 func file_desc_test_comments_proto_init() { 556 if File_desc_test_comments_proto != nil { 557 return 558 } 559 file_desc_test_options_proto_init() 560 if !protoimpl.UnsafeEnabled { 561 file_desc_test_comments_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 562 switch v := v.(*Request); i { 563 case 0: 564 return &v.state 565 case 1: 566 return &v.sizeCache 567 case 2: 568 return &v.unknownFields 569 case 3: 570 return &v.extensionFields 571 default: 572 return nil 573 } 574 } 575 file_desc_test_comments_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 576 switch v := v.(*AnEmptyMessage); i { 577 case 0: 578 return &v.state 579 case 1: 580 return &v.sizeCache 581 case 2: 582 return &v.unknownFields 583 default: 584 return nil 585 } 586 } 587 file_desc_test_comments_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 588 switch v := v.(*Request_Extras); i { 589 case 0: 590 return &v.state 591 case 1: 592 return &v.sizeCache 593 case 2: 594 return &v.unknownFields 595 default: 596 return nil 597 } 598 } 599 } 600 file_desc_test_comments_proto_msgTypes[0].OneofWrappers = []interface{}{ 601 (*Request_This)(nil), 602 (*Request_That)(nil), 603 (*Request_These)(nil), 604 (*Request_Those)(nil), 605 } 606 type x struct{} 607 out := protoimpl.TypeBuilder{ 608 File: protoimpl.DescBuilder{ 609 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 610 RawDescriptor: file_desc_test_comments_proto_rawDesc, 611 NumEnums: 1, 612 NumMessages: 4, 613 NumExtensions: 2, 614 NumServices: 1, 615 }, 616 GoTypes: file_desc_test_comments_proto_goTypes, 617 DependencyIndexes: file_desc_test_comments_proto_depIdxs, 618 EnumInfos: file_desc_test_comments_proto_enumTypes, 619 MessageInfos: file_desc_test_comments_proto_msgTypes, 620 ExtensionInfos: file_desc_test_comments_proto_extTypes, 621 }.Build() 622 File_desc_test_comments_proto = out.File 623 file_desc_test_comments_proto_rawDesc = nil 624 file_desc_test_comments_proto_goTypes = nil 625 file_desc_test_comments_proto_depIdxs = nil 626 } 627 628 // Reference imports to suppress errors if they are not otherwise used. 629 var _ context.Context 630 var _ grpc.ClientConnInterface 631 632 // This is a compile-time assertion to ensure that this generated file 633 // is compatible with the grpc package it is being compiled against. 634 const _ = grpc.SupportPackageIsVersion6 635 636 // RpcServiceClient is the client API for RpcService service. 637 // 638 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 639 type RpcServiceClient interface { 640 // Method comment 641 StreamingRpc(ctx context.Context, opts ...grpc.CallOption) (RpcService_StreamingRpcClient, error) 642 // Deprecated: Do not use. 643 UnaryRpc(ctx context.Context, in *Request, opts ...grpc.CallOption) (*empty.Empty, error) 644 } 645 646 type rpcServiceClient struct { 647 cc grpc.ClientConnInterface 648 } 649 650 func NewRpcServiceClient(cc grpc.ClientConnInterface) RpcServiceClient { 651 return &rpcServiceClient{cc} 652 } 653 654 func (c *rpcServiceClient) StreamingRpc(ctx context.Context, opts ...grpc.CallOption) (RpcService_StreamingRpcClient, error) { 655 stream, err := c.cc.NewStream(ctx, &_RpcService_serviceDesc.Streams[0], "/foo.bar.RpcService/StreamingRpc", opts...) 656 if err != nil { 657 return nil, err 658 } 659 x := &rpcServiceStreamingRpcClient{stream} 660 return x, nil 661 } 662 663 type RpcService_StreamingRpcClient interface { 664 Send(*Request) error 665 CloseAndRecv() (*Request, error) 666 grpc.ClientStream 667 } 668 669 type rpcServiceStreamingRpcClient struct { 670 grpc.ClientStream 671 } 672 673 func (x *rpcServiceStreamingRpcClient) Send(m *Request) error { 674 return x.ClientStream.SendMsg(m) 675 } 676 677 func (x *rpcServiceStreamingRpcClient) CloseAndRecv() (*Request, error) { 678 if err := x.ClientStream.CloseSend(); err != nil { 679 return nil, err 680 } 681 m := new(Request) 682 if err := x.ClientStream.RecvMsg(m); err != nil { 683 return nil, err 684 } 685 return m, nil 686 } 687 688 // Deprecated: Do not use. 689 func (c *rpcServiceClient) UnaryRpc(ctx context.Context, in *Request, opts ...grpc.CallOption) (*empty.Empty, error) { 690 out := new(empty.Empty) 691 err := c.cc.Invoke(ctx, "/foo.bar.RpcService/UnaryRpc", in, out, opts...) 692 if err != nil { 693 return nil, err 694 } 695 return out, nil 696 } 697 698 // RpcServiceServer is the server API for RpcService service. 699 type RpcServiceServer interface { 700 // Method comment 701 StreamingRpc(RpcService_StreamingRpcServer) error 702 // Deprecated: Do not use. 703 UnaryRpc(context.Context, *Request) (*empty.Empty, error) 704 } 705 706 // UnimplementedRpcServiceServer can be embedded to have forward compatible implementations. 707 type UnimplementedRpcServiceServer struct { 708 } 709 710 func (*UnimplementedRpcServiceServer) StreamingRpc(RpcService_StreamingRpcServer) error { 711 return status.Errorf(codes.Unimplemented, "method StreamingRpc not implemented") 712 } 713 func (*UnimplementedRpcServiceServer) UnaryRpc(context.Context, *Request) (*empty.Empty, error) { 714 return nil, status.Errorf(codes.Unimplemented, "method UnaryRpc not implemented") 715 } 716 717 func RegisterRpcServiceServer(s *grpc.Server, srv RpcServiceServer) { 718 s.RegisterService(&_RpcService_serviceDesc, srv) 719 } 720 721 func _RpcService_StreamingRpc_Handler(srv interface{}, stream grpc.ServerStream) error { 722 return srv.(RpcServiceServer).StreamingRpc(&rpcServiceStreamingRpcServer{stream}) 723 } 724 725 type RpcService_StreamingRpcServer interface { 726 SendAndClose(*Request) error 727 Recv() (*Request, error) 728 grpc.ServerStream 729 } 730 731 type rpcServiceStreamingRpcServer struct { 732 grpc.ServerStream 733 } 734 735 func (x *rpcServiceStreamingRpcServer) SendAndClose(m *Request) error { 736 return x.ServerStream.SendMsg(m) 737 } 738 739 func (x *rpcServiceStreamingRpcServer) Recv() (*Request, error) { 740 m := new(Request) 741 if err := x.ServerStream.RecvMsg(m); err != nil { 742 return nil, err 743 } 744 return m, nil 745 } 746 747 func _RpcService_UnaryRpc_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 748 in := new(Request) 749 if err := dec(in); err != nil { 750 return nil, err 751 } 752 if interceptor == nil { 753 return srv.(RpcServiceServer).UnaryRpc(ctx, in) 754 } 755 info := &grpc.UnaryServerInfo{ 756 Server: srv, 757 FullMethod: "/foo.bar.RpcService/UnaryRpc", 758 } 759 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 760 return srv.(RpcServiceServer).UnaryRpc(ctx, req.(*Request)) 761 } 762 return interceptor(ctx, in, info, handler) 763 } 764 765 var _RpcService_serviceDesc = grpc.ServiceDesc{ 766 ServiceName: "foo.bar.RpcService", 767 HandlerType: (*RpcServiceServer)(nil), 768 Methods: []grpc.MethodDesc{ 769 { 770 MethodName: "UnaryRpc", 771 Handler: _RpcService_UnaryRpc_Handler, 772 }, 773 }, 774 Streams: []grpc.StreamDesc{ 775 { 776 StreamName: "StreamingRpc", 777 Handler: _RpcService_StreamingRpc_Handler, 778 ClientStreams: true, 779 }, 780 }, 781 Metadata: "desc_test_comments.proto", 782 }