test.pb.go 10 KB

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