test.pb.go 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: irregular/test.proto
  3. package irregular
  4. import (
  5. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  6. protoiface "google.golang.org/protobuf/runtime/protoiface"
  7. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  8. sync "sync"
  9. )
  10. const (
  11. // Verify that runtime/protoimpl is sufficiently up-to-date.
  12. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 0)
  13. // Verify that this generated code is sufficiently up-to-date.
  14. _ = protoimpl.EnforceVersion(0 - protoimpl.MinVersion)
  15. )
  16. type Message struct {
  17. state protoimpl.MessageState
  18. OptionalMessage *IrregularMessage `protobuf:"bytes,1,opt,name=optional_message,json=optionalMessage" json:"optional_message,omitempty"`
  19. RepeatedMessage []*IrregularMessage `protobuf:"bytes,2,rep,name=repeated_message,json=repeatedMessage" json:"repeated_message,omitempty"`
  20. RequiredMessage *IrregularMessage `protobuf:"bytes,3,req,name=required_message,json=requiredMessage" json:"required_message,omitempty"`
  21. MapMessage map[string]*IrregularMessage `protobuf:"bytes,4,rep,name=map_message,json=mapMessage" json:"map_message,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  22. // Types that are valid to be assigned to Union:
  23. // *Message_OneofMessage
  24. Union isMessage_Union `protobuf_oneof:"union"`
  25. sizeCache protoimpl.SizeCache
  26. unknownFields protoimpl.UnknownFields
  27. }
  28. func (x *Message) Reset() {
  29. *x = Message{}
  30. }
  31. func (x *Message) String() string {
  32. return protoimpl.X.MessageStringOf(x)
  33. }
  34. func (*Message) ProtoMessage() {}
  35. func (x *Message) ProtoReflect() protoreflect.Message {
  36. mi := &file_irregular_test_proto_msgTypes[0]
  37. if protoimpl.UnsafeEnabled && x != nil {
  38. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  39. if ms.LoadMessageInfo() == nil {
  40. ms.StoreMessageInfo(mi)
  41. }
  42. return ms
  43. }
  44. return mi.MessageOf(x)
  45. }
  46. func (x *Message) XXX_Methods() *protoiface.Methods {
  47. return file_irregular_test_proto_msgTypes[0].Methods()
  48. }
  49. // Deprecated: Use Message.ProtoReflect.Type instead.
  50. func (*Message) Descriptor() ([]byte, []int) {
  51. return file_irregular_test_proto_rawDescGZIP(), []int{0}
  52. }
  53. func (x *Message) GetOptionalMessage() *IrregularMessage {
  54. if x != nil {
  55. return x.OptionalMessage
  56. }
  57. return nil
  58. }
  59. func (x *Message) GetRepeatedMessage() []*IrregularMessage {
  60. if x != nil {
  61. return x.RepeatedMessage
  62. }
  63. return nil
  64. }
  65. func (x *Message) GetRequiredMessage() *IrregularMessage {
  66. if x != nil {
  67. return x.RequiredMessage
  68. }
  69. return nil
  70. }
  71. func (x *Message) GetMapMessage() map[string]*IrregularMessage {
  72. if x != nil {
  73. return x.MapMessage
  74. }
  75. return nil
  76. }
  77. func (m *Message) GetUnion() isMessage_Union {
  78. if m != nil {
  79. return m.Union
  80. }
  81. return nil
  82. }
  83. func (x *Message) GetOneofMessage() *IrregularMessage {
  84. if x, ok := x.GetUnion().(*Message_OneofMessage); ok {
  85. return x.OneofMessage
  86. }
  87. return nil
  88. }
  89. type isMessage_Union interface {
  90. isMessage_Union()
  91. }
  92. type Message_OneofMessage struct {
  93. OneofMessage *IrregularMessage `protobuf:"bytes,5,opt,name=oneof_message,json=oneofMessage,oneof"`
  94. }
  95. func (*Message_OneofMessage) isMessage_Union() {}
  96. var File_irregular_test_proto protoreflect.FileDescriptor
  97. var file_irregular_test_proto_rawDesc = []byte{
  98. 0x0a, 0x14, 0x69, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x2f, 0x74, 0x65, 0x73, 0x74,
  99. 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
  100. 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x69, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x1a,
  101. 0x19, 0x69, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x2f, 0x69, 0x72, 0x72, 0x65, 0x67,
  102. 0x75, 0x6c, 0x61, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x04, 0x0a, 0x07, 0x4d,
  103. 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x54, 0x0a, 0x10, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
  104. 0x61, 0x6c, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
  105. 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
  106. 0x2e, 0x69, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x2e, 0x49, 0x72, 0x72, 0x65, 0x67,
  107. 0x75, 0x6c, 0x61, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0f, 0x6f, 0x70, 0x74,
  108. 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x54, 0x0a, 0x10,
  109. 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
  110. 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
  111. 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x69, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72,
  112. 0x2e, 0x49, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
  113. 0x65, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61,
  114. 0x67, 0x65, 0x12, 0x54, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x6d,
  115. 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67,
  116. 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x69, 0x72, 0x72,
  117. 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x2e, 0x49, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72,
  118. 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65,
  119. 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x51, 0x0a, 0x0b, 0x6d, 0x61, 0x70, 0x5f,
  120. 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e,
  121. 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x69, 0x72,
  122. 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e,
  123. 0x4d, 0x61, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
  124. 0x0a, 0x6d, 0x61, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x50, 0x0a, 0x0d, 0x6f,
  125. 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01,
  126. 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f,
  127. 0x74, 0x6f, 0x2e, 0x69, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x2e, 0x49, 0x72, 0x72,
  128. 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52,
  129. 0x0c, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x68, 0x0a,
  130. 0x0f, 0x4d, 0x61, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79,
  131. 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
  132. 0x65, 0x79, 0x12, 0x3f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
  133. 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74,
  134. 0x6f, 0x2e, 0x69, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x2e, 0x49, 0x72, 0x72, 0x65,
  135. 0x67, 0x75, 0x6c, 0x61, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x05, 0x76, 0x61,
  136. 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e,
  137. 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e,
  138. 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x69,
  139. 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74,
  140. 0x6f, 0x73, 0x2f, 0x69, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72,
  141. }
  142. var (
  143. file_irregular_test_proto_rawDescOnce sync.Once
  144. file_irregular_test_proto_rawDescData = file_irregular_test_proto_rawDesc
  145. )
  146. func file_irregular_test_proto_rawDescGZIP() []byte {
  147. file_irregular_test_proto_rawDescOnce.Do(func() {
  148. file_irregular_test_proto_rawDescData = protoimpl.X.CompressGZIP(file_irregular_test_proto_rawDescData)
  149. })
  150. return file_irregular_test_proto_rawDescData
  151. }
  152. var file_irregular_test_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
  153. var file_irregular_test_proto_goTypes = []interface{}{
  154. (*Message)(nil), // 0: goproto.proto.irregular.Message
  155. nil, // 1: goproto.proto.irregular.Message.MapMessageEntry
  156. (*IrregularMessage)(nil), // 2: goproto.proto.irregular.IrregularMessage
  157. }
  158. var file_irregular_test_proto_depIdxs = []int32{
  159. 2, // goproto.proto.irregular.Message.optional_message:type_name -> goproto.proto.irregular.IrregularMessage
  160. 2, // goproto.proto.irregular.Message.repeated_message:type_name -> goproto.proto.irregular.IrregularMessage
  161. 2, // goproto.proto.irregular.Message.required_message:type_name -> goproto.proto.irregular.IrregularMessage
  162. 1, // goproto.proto.irregular.Message.map_message:type_name -> goproto.proto.irregular.Message.MapMessageEntry
  163. 2, // goproto.proto.irregular.Message.oneof_message:type_name -> goproto.proto.irregular.IrregularMessage
  164. 2, // goproto.proto.irregular.Message.MapMessageEntry.value:type_name -> goproto.proto.irregular.IrregularMessage
  165. 6, // starting offset of method output_type sub-list
  166. 6, // starting offset of method input_type sub-list
  167. 6, // starting offset of extension type_name sub-list
  168. 6, // starting offset of extension extendee sub-list
  169. 0, // starting offset of field type_name sub-list
  170. }
  171. func init() { file_irregular_test_proto_init() }
  172. func file_irregular_test_proto_init() {
  173. if File_irregular_test_proto != nil {
  174. return
  175. }
  176. file_irregular_irregular_proto_init()
  177. if !protoimpl.UnsafeEnabled {
  178. file_irregular_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  179. switch v := v.(*Message); i {
  180. case 0:
  181. return &v.state
  182. case 6:
  183. return &v.sizeCache
  184. case 7:
  185. return &v.unknownFields
  186. default:
  187. return nil
  188. }
  189. }
  190. }
  191. file_irregular_test_proto_msgTypes[0].OneofWrappers = []interface{}{
  192. (*Message_OneofMessage)(nil),
  193. }
  194. out := protoimpl.TypeBuilder{
  195. File: protoimpl.DescBuilder{
  196. RawDescriptor: file_irregular_test_proto_rawDesc,
  197. NumEnums: 0,
  198. NumMessages: 2,
  199. NumExtensions: 0,
  200. NumServices: 0,
  201. },
  202. GoTypes: file_irregular_test_proto_goTypes,
  203. DependencyIndexes: file_irregular_test_proto_depIdxs,
  204. MessageInfos: file_irregular_test_proto_msgTypes,
  205. }.Build()
  206. File_irregular_test_proto = out.File
  207. file_irregular_test_proto_rawDesc = nil
  208. file_irregular_test_proto_goTypes = nil
  209. file_irregular_test_proto_depIdxs = nil
  210. }