blob: a63ca773723830b2e34a700d8218d6fac3dbe66c [file] [log] [blame]
Joe Tsai8d5e6d62019-08-06 01:15:48 -07001// 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
5// This file contains a message which references a message that implements the
6// proto.Message interface but does not have the structure of a normal generated
7// message.
8
Damien Neil5b6d0472019-06-14 11:54:07 -07009// Code generated by protoc-gen-go. DO NOT EDIT.
10// source: irregular/test.proto
11
12package irregular
13
14import (
15 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
Damien Neil5b6d0472019-06-14 11:54:07 -070016 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
Joe Tsaiaf570872019-07-14 23:04:40 -070017 reflect "reflect"
Damien Neil5b6d0472019-06-14 11:54:07 -070018 sync "sync"
19)
20
21const (
22 // Verify that runtime/protoimpl is sufficiently up-to-date.
23 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 0)
24 // Verify that this generated code is sufficiently up-to-date.
25 _ = protoimpl.EnforceVersion(0 - protoimpl.MinVersion)
26)
27
28type Message struct {
Joe Tsai8d5e6d62019-08-06 01:15:48 -070029 state protoimpl.MessageState
30 sizeCache protoimpl.SizeCache
31 unknownFields protoimpl.UnknownFields
32
Damien Neil5b6d0472019-06-14 11:54:07 -070033 OptionalMessage *IrregularMessage `protobuf:"bytes,1,opt,name=optional_message,json=optionalMessage" json:"optional_message,omitempty"`
34 RepeatedMessage []*IrregularMessage `protobuf:"bytes,2,rep,name=repeated_message,json=repeatedMessage" json:"repeated_message,omitempty"`
35 RequiredMessage *IrregularMessage `protobuf:"bytes,3,req,name=required_message,json=requiredMessage" json:"required_message,omitempty"`
36 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"`
Joe Tsai8d5e6d62019-08-06 01:15:48 -070037 // Types that are assignable to Union:
Damien Neil5b6d0472019-06-14 11:54:07 -070038 // *Message_OneofMessage
Joe Tsai38b61962019-08-05 13:09:30 -070039 Union isMessage_Union `protobuf_oneof:"union"`
Damien Neil5b6d0472019-06-14 11:54:07 -070040}
41
42func (x *Message) Reset() {
43 *x = Message{}
44}
45
46func (x *Message) String() string {
47 return protoimpl.X.MessageStringOf(x)
48}
49
50func (*Message) ProtoMessage() {}
51
52func (x *Message) ProtoReflect() protoreflect.Message {
Joe Tsai82760ce2019-06-20 03:09:57 -070053 mi := &file_irregular_test_proto_msgTypes[0]
54 if protoimpl.UnsafeEnabled && x != nil {
55 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
56 if ms.LoadMessageInfo() == nil {
57 ms.StoreMessageInfo(mi)
58 }
59 return ms
60 }
61 return mi.MessageOf(x)
Damien Neil5b6d0472019-06-14 11:54:07 -070062}
63
Joe Tsai43761bd2019-07-17 18:06:47 -070064// Deprecated: Use Message.ProtoReflect.Descriptor instead.
Damien Neil5b6d0472019-06-14 11:54:07 -070065func (*Message) Descriptor() ([]byte, []int) {
66 return file_irregular_test_proto_rawDescGZIP(), []int{0}
67}
68
69func (x *Message) GetOptionalMessage() *IrregularMessage {
70 if x != nil {
71 return x.OptionalMessage
72 }
73 return nil
74}
75
76func (x *Message) GetRepeatedMessage() []*IrregularMessage {
77 if x != nil {
78 return x.RepeatedMessage
79 }
80 return nil
81}
82
83func (x *Message) GetRequiredMessage() *IrregularMessage {
84 if x != nil {
85 return x.RequiredMessage
86 }
87 return nil
88}
89
90func (x *Message) GetMapMessage() map[string]*IrregularMessage {
91 if x != nil {
92 return x.MapMessage
93 }
94 return nil
95}
96
97func (m *Message) GetUnion() isMessage_Union {
98 if m != nil {
99 return m.Union
100 }
101 return nil
102}
103
104func (x *Message) GetOneofMessage() *IrregularMessage {
105 if x, ok := x.GetUnion().(*Message_OneofMessage); ok {
106 return x.OneofMessage
107 }
108 return nil
109}
110
Damien Neil5b6d0472019-06-14 11:54:07 -0700111type isMessage_Union interface {
112 isMessage_Union()
113}
114
115type Message_OneofMessage struct {
116 OneofMessage *IrregularMessage `protobuf:"bytes,5,opt,name=oneof_message,json=oneofMessage,oneof"`
117}
118
119func (*Message_OneofMessage) isMessage_Union() {}
120
121var File_irregular_test_proto protoreflect.FileDescriptor
122
123var file_irregular_test_proto_rawDesc = []byte{
124 0x0a, 0x14, 0x69, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x2f, 0x74, 0x65, 0x73, 0x74,
125 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
126 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x69, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x1a,
127 0x19, 0x69, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x2f, 0x69, 0x72, 0x72, 0x65, 0x67,
128 0x75, 0x6c, 0x61, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x04, 0x0a, 0x07, 0x4d,
129 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x54, 0x0a, 0x10, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
130 0x61, 0x6c, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
131 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
132 0x2e, 0x69, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x2e, 0x49, 0x72, 0x72, 0x65, 0x67,
133 0x75, 0x6c, 0x61, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0f, 0x6f, 0x70, 0x74,
134 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x54, 0x0a, 0x10,
135 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
136 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
137 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x69, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72,
138 0x2e, 0x49, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
139 0x65, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61,
140 0x67, 0x65, 0x12, 0x54, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x6d,
141 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67,
142 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x69, 0x72, 0x72,
143 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x2e, 0x49, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72,
144 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65,
145 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x51, 0x0a, 0x0b, 0x6d, 0x61, 0x70, 0x5f,
146 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e,
147 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x69, 0x72,
148 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e,
149 0x4d, 0x61, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
150 0x0a, 0x6d, 0x61, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x50, 0x0a, 0x0d, 0x6f,
151 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01,
152 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f,
153 0x74, 0x6f, 0x2e, 0x69, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x2e, 0x49, 0x72, 0x72,
154 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52,
155 0x0c, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x68, 0x0a,
156 0x0f, 0x4d, 0x61, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79,
157 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
158 0x65, 0x79, 0x12, 0x3f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
159 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74,
160 0x6f, 0x2e, 0x69, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x2e, 0x49, 0x72, 0x72, 0x65,
161 0x67, 0x75, 0x6c, 0x61, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x05, 0x76, 0x61,
162 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e,
163 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e,
164 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x69,
165 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74,
166 0x6f, 0x73, 0x2f, 0x69, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72,
167}
168
169var (
170 file_irregular_test_proto_rawDescOnce sync.Once
171 file_irregular_test_proto_rawDescData = file_irregular_test_proto_rawDesc
172)
173
174func file_irregular_test_proto_rawDescGZIP() []byte {
175 file_irregular_test_proto_rawDescOnce.Do(func() {
176 file_irregular_test_proto_rawDescData = protoimpl.X.CompressGZIP(file_irregular_test_proto_rawDescData)
177 })
178 return file_irregular_test_proto_rawDescData
179}
180
181var file_irregular_test_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
182var file_irregular_test_proto_goTypes = []interface{}{
183 (*Message)(nil), // 0: goproto.proto.irregular.Message
184 nil, // 1: goproto.proto.irregular.Message.MapMessageEntry
185 (*IrregularMessage)(nil), // 2: goproto.proto.irregular.IrregularMessage
186}
187var file_irregular_test_proto_depIdxs = []int32{
188 2, // goproto.proto.irregular.Message.optional_message:type_name -> goproto.proto.irregular.IrregularMessage
189 2, // goproto.proto.irregular.Message.repeated_message:type_name -> goproto.proto.irregular.IrregularMessage
190 2, // goproto.proto.irregular.Message.required_message:type_name -> goproto.proto.irregular.IrregularMessage
191 1, // goproto.proto.irregular.Message.map_message:type_name -> goproto.proto.irregular.Message.MapMessageEntry
192 2, // goproto.proto.irregular.Message.oneof_message:type_name -> goproto.proto.irregular.IrregularMessage
193 2, // goproto.proto.irregular.Message.MapMessageEntry.value:type_name -> goproto.proto.irregular.IrregularMessage
Joe Tsaid8881392019-06-06 13:01:53 -0700194 6, // starting offset of method output_type sub-list
195 6, // starting offset of method input_type sub-list
196 6, // starting offset of extension type_name sub-list
197 6, // starting offset of extension extendee sub-list
198 0, // starting offset of field type_name sub-list
Damien Neil5b6d0472019-06-14 11:54:07 -0700199}
200
201func init() { file_irregular_test_proto_init() }
202func file_irregular_test_proto_init() {
203 if File_irregular_test_proto != nil {
204 return
205 }
206 file_irregular_irregular_proto_init()
Joe Tsaic0e4bb22019-07-06 13:05:11 -0700207 if !protoimpl.UnsafeEnabled {
208 file_irregular_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
209 switch v := v.(*Message); i {
Joe Tsai82760ce2019-06-20 03:09:57 -0700210 case 0:
211 return &v.state
Joe Tsai38b61962019-08-05 13:09:30 -0700212 case 1:
Joe Tsai82760ce2019-06-20 03:09:57 -0700213 return &v.sizeCache
Joe Tsai38b61962019-08-05 13:09:30 -0700214 case 2:
Joe Tsaic0e4bb22019-07-06 13:05:11 -0700215 return &v.unknownFields
216 default:
217 return nil
218 }
219 }
220 }
Joe Tsai09912272019-07-08 10:38:11 -0700221 file_irregular_test_proto_msgTypes[0].OneofWrappers = []interface{}{
222 (*Message_OneofMessage)(nil),
223 }
Joe Tsaiaf570872019-07-14 23:04:40 -0700224 type x struct{}
Joe Tsaid8881392019-06-06 13:01:53 -0700225 out := protoimpl.TypeBuilder{
226 File: protoimpl.DescBuilder{
Joe Tsaiaf570872019-07-14 23:04:40 -0700227 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
Joe Tsaid8881392019-06-06 13:01:53 -0700228 RawDescriptor: file_irregular_test_proto_rawDesc,
229 NumEnums: 0,
230 NumMessages: 2,
231 NumExtensions: 0,
232 NumServices: 0,
233 },
234 GoTypes: file_irregular_test_proto_goTypes,
235 DependencyIndexes: file_irregular_test_proto_depIdxs,
236 MessageInfos: file_irregular_test_proto_msgTypes,
237 }.Build()
238 File_irregular_test_proto = out.File
Damien Neil5b6d0472019-06-14 11:54:07 -0700239 file_irregular_test_proto_rawDesc = nil
240 file_irregular_test_proto_goTypes = nil
241 file_irregular_test_proto_depIdxs = nil
242}