test.pb.go 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561
  1. // Copyright 2018 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // Different proto type definitions for testing the Types registry.
  5. // Code generated by protoc-gen-go. DO NOT EDIT.
  6. // source: test.proto
  7. package testprotos
  8. import (
  9. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  10. protoiface "google.golang.org/protobuf/runtime/protoiface"
  11. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  12. reflect "reflect"
  13. sync "sync"
  14. )
  15. type Enum1 int32
  16. const (
  17. Enum1_ONE Enum1 = 1
  18. )
  19. // Enum value maps for Enum1.
  20. var (
  21. Enum1_name = map[int32]string{
  22. 1: "ONE",
  23. }
  24. Enum1_value = map[string]int32{
  25. "ONE": 1,
  26. }
  27. )
  28. func (x Enum1) Enum() *Enum1 {
  29. p := new(Enum1)
  30. *p = x
  31. return p
  32. }
  33. func (x Enum1) String() string {
  34. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  35. }
  36. func (Enum1) Descriptor() protoreflect.EnumDescriptor {
  37. return file_test_proto_enumTypes[0].Descriptor()
  38. }
  39. func (Enum1) Type() protoreflect.EnumType {
  40. return &file_test_proto_enumTypes[0]
  41. }
  42. func (x Enum1) Number() protoreflect.EnumNumber {
  43. return protoreflect.EnumNumber(x)
  44. }
  45. // Deprecated: Do not use.
  46. func (x *Enum1) UnmarshalJSON(b []byte) error {
  47. num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
  48. if err != nil {
  49. return err
  50. }
  51. *x = Enum1(num)
  52. return nil
  53. }
  54. // Deprecated: Use Enum1.Descriptor instead.
  55. func (Enum1) EnumDescriptor() ([]byte, []int) {
  56. return file_test_proto_rawDescGZIP(), []int{0}
  57. }
  58. type Enum2 int32
  59. const (
  60. Enum2_UNO Enum2 = 1
  61. )
  62. // Enum value maps for Enum2.
  63. var (
  64. Enum2_name = map[int32]string{
  65. 1: "UNO",
  66. }
  67. Enum2_value = map[string]int32{
  68. "UNO": 1,
  69. }
  70. )
  71. func (x Enum2) Enum() *Enum2 {
  72. p := new(Enum2)
  73. *p = x
  74. return p
  75. }
  76. func (x Enum2) String() string {
  77. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  78. }
  79. func (Enum2) Descriptor() protoreflect.EnumDescriptor {
  80. return file_test_proto_enumTypes[1].Descriptor()
  81. }
  82. func (Enum2) Type() protoreflect.EnumType {
  83. return &file_test_proto_enumTypes[1]
  84. }
  85. func (x Enum2) Number() protoreflect.EnumNumber {
  86. return protoreflect.EnumNumber(x)
  87. }
  88. // Deprecated: Do not use.
  89. func (x *Enum2) UnmarshalJSON(b []byte) error {
  90. num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
  91. if err != nil {
  92. return err
  93. }
  94. *x = Enum2(num)
  95. return nil
  96. }
  97. // Deprecated: Use Enum2.Descriptor instead.
  98. func (Enum2) EnumDescriptor() ([]byte, []int) {
  99. return file_test_proto_rawDescGZIP(), []int{1}
  100. }
  101. type Enum3 int32
  102. const (
  103. Enum3_YI Enum3 = 1
  104. )
  105. // Enum value maps for Enum3.
  106. var (
  107. Enum3_name = map[int32]string{
  108. 1: "YI",
  109. }
  110. Enum3_value = map[string]int32{
  111. "YI": 1,
  112. }
  113. )
  114. func (x Enum3) Enum() *Enum3 {
  115. p := new(Enum3)
  116. *p = x
  117. return p
  118. }
  119. func (x Enum3) String() string {
  120. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  121. }
  122. func (Enum3) Descriptor() protoreflect.EnumDescriptor {
  123. return file_test_proto_enumTypes[2].Descriptor()
  124. }
  125. func (Enum3) Type() protoreflect.EnumType {
  126. return &file_test_proto_enumTypes[2]
  127. }
  128. func (x Enum3) Number() protoreflect.EnumNumber {
  129. return protoreflect.EnumNumber(x)
  130. }
  131. // Deprecated: Do not use.
  132. func (x *Enum3) UnmarshalJSON(b []byte) error {
  133. num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
  134. if err != nil {
  135. return err
  136. }
  137. *x = Enum3(num)
  138. return nil
  139. }
  140. // Deprecated: Use Enum3.Descriptor instead.
  141. func (Enum3) EnumDescriptor() ([]byte, []int) {
  142. return file_test_proto_rawDescGZIP(), []int{2}
  143. }
  144. type Message1 struct {
  145. state protoimpl.MessageState
  146. sizeCache protoimpl.SizeCache
  147. unknownFields protoimpl.UnknownFields
  148. extensionFields protoimpl.ExtensionFields
  149. }
  150. func (x *Message1) Reset() {
  151. *x = Message1{}
  152. }
  153. func (x *Message1) String() string {
  154. return protoimpl.X.MessageStringOf(x)
  155. }
  156. func (*Message1) ProtoMessage() {}
  157. func (x *Message1) ProtoReflect() protoreflect.Message {
  158. mi := &file_test_proto_msgTypes[0]
  159. if protoimpl.UnsafeEnabled && x != nil {
  160. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  161. if ms.LoadMessageInfo() == nil {
  162. ms.StoreMessageInfo(mi)
  163. }
  164. return ms
  165. }
  166. return mi.MessageOf(x)
  167. }
  168. // Deprecated: Use Message1.ProtoReflect.Descriptor instead.
  169. func (*Message1) Descriptor() ([]byte, []int) {
  170. return file_test_proto_rawDescGZIP(), []int{0}
  171. }
  172. var extRange_Message1 = []protoiface.ExtensionRangeV1{
  173. {Start: 10, End: 536870911},
  174. }
  175. // Deprecated: Use Message1.ProtoReflect.Descriptor.ExtensionRanges instead.
  176. func (*Message1) ExtensionRangeArray() []protoiface.ExtensionRangeV1 {
  177. return extRange_Message1
  178. }
  179. type Message2 struct {
  180. state protoimpl.MessageState
  181. sizeCache protoimpl.SizeCache
  182. unknownFields protoimpl.UnknownFields
  183. }
  184. func (x *Message2) Reset() {
  185. *x = Message2{}
  186. }
  187. func (x *Message2) String() string {
  188. return protoimpl.X.MessageStringOf(x)
  189. }
  190. func (*Message2) ProtoMessage() {}
  191. func (x *Message2) ProtoReflect() protoreflect.Message {
  192. mi := &file_test_proto_msgTypes[1]
  193. if protoimpl.UnsafeEnabled && x != nil {
  194. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  195. if ms.LoadMessageInfo() == nil {
  196. ms.StoreMessageInfo(mi)
  197. }
  198. return ms
  199. }
  200. return mi.MessageOf(x)
  201. }
  202. // Deprecated: Use Message2.ProtoReflect.Descriptor instead.
  203. func (*Message2) Descriptor() ([]byte, []int) {
  204. return file_test_proto_rawDescGZIP(), []int{1}
  205. }
  206. type Message3 struct {
  207. state protoimpl.MessageState
  208. sizeCache protoimpl.SizeCache
  209. unknownFields protoimpl.UnknownFields
  210. }
  211. func (x *Message3) Reset() {
  212. *x = Message3{}
  213. }
  214. func (x *Message3) String() string {
  215. return protoimpl.X.MessageStringOf(x)
  216. }
  217. func (*Message3) ProtoMessage() {}
  218. func (x *Message3) ProtoReflect() protoreflect.Message {
  219. mi := &file_test_proto_msgTypes[2]
  220. if protoimpl.UnsafeEnabled && x != nil {
  221. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  222. if ms.LoadMessageInfo() == nil {
  223. ms.StoreMessageInfo(mi)
  224. }
  225. return ms
  226. }
  227. return mi.MessageOf(x)
  228. }
  229. // Deprecated: Use Message3.ProtoReflect.Descriptor instead.
  230. func (*Message3) Descriptor() ([]byte, []int) {
  231. return file_test_proto_rawDescGZIP(), []int{2}
  232. }
  233. type Message4 struct {
  234. state protoimpl.MessageState
  235. sizeCache protoimpl.SizeCache
  236. unknownFields protoimpl.UnknownFields
  237. BoolField *bool `protobuf:"varint,30,opt,name=bool_field,json=boolField" json:"bool_field,omitempty"`
  238. }
  239. func (x *Message4) Reset() {
  240. *x = Message4{}
  241. }
  242. func (x *Message4) String() string {
  243. return protoimpl.X.MessageStringOf(x)
  244. }
  245. func (*Message4) ProtoMessage() {}
  246. func (x *Message4) ProtoReflect() protoreflect.Message {
  247. mi := &file_test_proto_msgTypes[3]
  248. if protoimpl.UnsafeEnabled && x != nil {
  249. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  250. if ms.LoadMessageInfo() == nil {
  251. ms.StoreMessageInfo(mi)
  252. }
  253. return ms
  254. }
  255. return mi.MessageOf(x)
  256. }
  257. // Deprecated: Use Message4.ProtoReflect.Descriptor instead.
  258. func (*Message4) Descriptor() ([]byte, []int) {
  259. return file_test_proto_rawDescGZIP(), []int{3}
  260. }
  261. func (x *Message4) GetBoolField() bool {
  262. if x != nil && x.BoolField != nil {
  263. return *x.BoolField
  264. }
  265. return false
  266. }
  267. var file_test_proto_extTypes = []protoimpl.ExtensionInfo{
  268. {
  269. ExtendedType: (*Message1)(nil),
  270. ExtensionType: (*string)(nil),
  271. Field: 11,
  272. Name: "testprotos.string_field",
  273. Tag: "bytes,11,opt,name=string_field",
  274. Filename: "test.proto",
  275. },
  276. {
  277. ExtendedType: (*Message1)(nil),
  278. ExtensionType: (*Enum1)(nil),
  279. Field: 12,
  280. Name: "testprotos.enum_field",
  281. Tag: "varint,12,opt,name=enum_field,enum=testprotos.Enum1",
  282. Filename: "test.proto",
  283. },
  284. {
  285. ExtendedType: (*Message1)(nil),
  286. ExtensionType: (*Message2)(nil),
  287. Field: 13,
  288. Name: "testprotos.message_field",
  289. Tag: "bytes,13,opt,name=message_field",
  290. Filename: "test.proto",
  291. },
  292. {
  293. ExtendedType: (*Message1)(nil),
  294. ExtensionType: (*Message2)(nil),
  295. Field: 21,
  296. Name: "testprotos.Message4.message_field",
  297. Tag: "bytes,21,opt,name=message_field",
  298. Filename: "test.proto",
  299. },
  300. {
  301. ExtendedType: (*Message1)(nil),
  302. ExtensionType: (*Enum1)(nil),
  303. Field: 22,
  304. Name: "testprotos.Message4.enum_field",
  305. Tag: "varint,22,opt,name=enum_field,enum=testprotos.Enum1",
  306. Filename: "test.proto",
  307. },
  308. {
  309. ExtendedType: (*Message1)(nil),
  310. ExtensionType: (*string)(nil),
  311. Field: 23,
  312. Name: "testprotos.Message4.string_field",
  313. Tag: "bytes,23,opt,name=string_field",
  314. Filename: "test.proto",
  315. },
  316. }
  317. // Extension fields to Message1.
  318. var (
  319. // optional string string_field = 11;
  320. E_StringField = &file_test_proto_extTypes[0]
  321. // optional testprotos.Enum1 enum_field = 12;
  322. E_EnumField = &file_test_proto_extTypes[1]
  323. // optional testprotos.Message2 message_field = 13;
  324. E_MessageField = &file_test_proto_extTypes[2]
  325. // optional testprotos.Message2 message_field = 21;
  326. E_Message4_MessageField = &file_test_proto_extTypes[3]
  327. // optional testprotos.Enum1 enum_field = 22;
  328. E_Message4_EnumField = &file_test_proto_extTypes[4]
  329. // optional string string_field = 23;
  330. E_Message4_StringField = &file_test_proto_extTypes[5]
  331. )
  332. var File_test_proto protoreflect.FileDescriptor
  333. var file_test_proto_rawDesc = []byte{
  334. 0x0a, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x74, 0x65,
  335. 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0x14, 0x0a, 0x08, 0x4d, 0x65, 0x73, 0x73,
  336. 0x61, 0x67, 0x65, 0x31, 0x2a, 0x08, 0x08, 0x0a, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x0a,
  337. 0x0a, 0x08, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x22, 0x0a, 0x0a, 0x08, 0x4d, 0x65,
  338. 0x73, 0x73, 0x61, 0x67, 0x65, 0x33, 0x22, 0xfb, 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x73, 0x73, 0x61,
  339. 0x67, 0x65, 0x34, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c,
  340. 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x46, 0x69, 0x65,
  341. 0x6c, 0x64, 0x32, 0x4f, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x66, 0x69,
  342. 0x65, 0x6c, 0x64, 0x12, 0x14, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73,
  343. 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x31, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32,
  344. 0x14, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, 0x65, 0x73,
  345. 0x73, 0x61, 0x67, 0x65, 0x32, 0x52, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x46, 0x69,
  346. 0x65, 0x6c, 0x64, 0x32, 0x46, 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x66, 0x69, 0x65, 0x6c,
  347. 0x64, 0x12, 0x14, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d,
  348. 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x31, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e,
  349. 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x31,
  350. 0x52, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x32, 0x37, 0x0a, 0x0c, 0x73,
  351. 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x14, 0x2e, 0x74, 0x65,
  352. 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
  353. 0x31, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46,
  354. 0x69, 0x65, 0x6c, 0x64, 0x2a, 0x10, 0x0a, 0x05, 0x45, 0x6e, 0x75, 0x6d, 0x31, 0x12, 0x07, 0x0a,
  355. 0x03, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x2a, 0x10, 0x0a, 0x05, 0x45, 0x6e, 0x75, 0x6d, 0x32, 0x12,
  356. 0x07, 0x0a, 0x03, 0x55, 0x4e, 0x4f, 0x10, 0x01, 0x2a, 0x0f, 0x0a, 0x05, 0x45, 0x6e, 0x75, 0x6d,
  357. 0x33, 0x12, 0x06, 0x0a, 0x02, 0x59, 0x49, 0x10, 0x01, 0x3a, 0x37, 0x0a, 0x0c, 0x73, 0x74, 0x72,
  358. 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x14, 0x2e, 0x74, 0x65, 0x73, 0x74,
  359. 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x31, 0x18,
  360. 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x65,
  361. 0x6c, 0x64, 0x3a, 0x46, 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64,
  362. 0x12, 0x14, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, 0x65,
  363. 0x73, 0x73, 0x61, 0x67, 0x65, 0x31, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x74,
  364. 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x31, 0x52,
  365. 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x4f, 0x0a, 0x0d, 0x6d, 0x65,
  366. 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x14, 0x2e, 0x74, 0x65,
  367. 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
  368. 0x31, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72,
  369. 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x52, 0x0c, 0x6d,
  370. 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x3d, 0x5a, 0x3b, 0x67,
  371. 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67,
  372. 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63,
  373. 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f,
  374. 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73,
  375. }
  376. var (
  377. file_test_proto_rawDescOnce sync.Once
  378. file_test_proto_rawDescData = file_test_proto_rawDesc
  379. )
  380. func file_test_proto_rawDescGZIP() []byte {
  381. file_test_proto_rawDescOnce.Do(func() {
  382. file_test_proto_rawDescData = protoimpl.X.CompressGZIP(file_test_proto_rawDescData)
  383. })
  384. return file_test_proto_rawDescData
  385. }
  386. var file_test_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
  387. var file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
  388. var file_test_proto_goTypes = []interface{}{
  389. (Enum1)(0), // 0: testprotos.Enum1
  390. (Enum2)(0), // 1: testprotos.Enum2
  391. (Enum3)(0), // 2: testprotos.Enum3
  392. (*Message1)(nil), // 3: testprotos.Message1
  393. (*Message2)(nil), // 4: testprotos.Message2
  394. (*Message3)(nil), // 5: testprotos.Message3
  395. (*Message4)(nil), // 6: testprotos.Message4
  396. }
  397. var file_test_proto_depIdxs = []int32{
  398. 3, // 0: testprotos.string_field:extendee -> testprotos.Message1
  399. 3, // 1: testprotos.enum_field:extendee -> testprotos.Message1
  400. 3, // 2: testprotos.message_field:extendee -> testprotos.Message1
  401. 3, // 3: testprotos.Message4.message_field:extendee -> testprotos.Message1
  402. 3, // 4: testprotos.Message4.enum_field:extendee -> testprotos.Message1
  403. 3, // 5: testprotos.Message4.string_field:extendee -> testprotos.Message1
  404. 0, // 6: testprotos.enum_field:type_name -> testprotos.Enum1
  405. 4, // 7: testprotos.message_field:type_name -> testprotos.Message2
  406. 4, // 8: testprotos.Message4.message_field:type_name -> testprotos.Message2
  407. 0, // 9: testprotos.Message4.enum_field:type_name -> testprotos.Enum1
  408. 10, // [10:10] is the sub-list for method output_type
  409. 10, // [10:10] is the sub-list for method input_type
  410. 6, // [6:10] is the sub-list for extension type_name
  411. 0, // [0:6] is the sub-list for extension extendee
  412. 0, // [0:0] is the sub-list for field type_name
  413. }
  414. func init() { file_test_proto_init() }
  415. func file_test_proto_init() {
  416. if File_test_proto != nil {
  417. return
  418. }
  419. if !protoimpl.UnsafeEnabled {
  420. file_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  421. switch v := v.(*Message1); i {
  422. case 0:
  423. return &v.state
  424. case 1:
  425. return &v.sizeCache
  426. case 2:
  427. return &v.unknownFields
  428. case 3:
  429. return &v.extensionFields
  430. default:
  431. return nil
  432. }
  433. }
  434. file_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  435. switch v := v.(*Message2); i {
  436. case 0:
  437. return &v.state
  438. case 1:
  439. return &v.sizeCache
  440. case 2:
  441. return &v.unknownFields
  442. default:
  443. return nil
  444. }
  445. }
  446. file_test_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  447. switch v := v.(*Message3); i {
  448. case 0:
  449. return &v.state
  450. case 1:
  451. return &v.sizeCache
  452. case 2:
  453. return &v.unknownFields
  454. default:
  455. return nil
  456. }
  457. }
  458. file_test_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
  459. switch v := v.(*Message4); i {
  460. case 0:
  461. return &v.state
  462. case 1:
  463. return &v.sizeCache
  464. case 2:
  465. return &v.unknownFields
  466. default:
  467. return nil
  468. }
  469. }
  470. }
  471. type x struct{}
  472. out := protoimpl.TypeBuilder{
  473. File: protoimpl.DescBuilder{
  474. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  475. RawDescriptor: file_test_proto_rawDesc,
  476. NumEnums: 3,
  477. NumMessages: 4,
  478. NumExtensions: 6,
  479. NumServices: 0,
  480. },
  481. GoTypes: file_test_proto_goTypes,
  482. DependencyIndexes: file_test_proto_depIdxs,
  483. EnumInfos: file_test_proto_enumTypes,
  484. MessageInfos: file_test_proto_msgTypes,
  485. ExtensionInfos: file_test_proto_extTypes,
  486. }.Build()
  487. File_test_proto = out.File
  488. file_test_proto_rawDesc = nil
  489. file_test_proto_goTypes = nil
  490. file_test_proto_depIdxs = nil
  491. }