blob: df8ebf38cd21d26b61265bac1d4549079bb403a9 [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
Damien Neil5b6d0472019-06-14 11:54:07 -070021type Message struct {
Joe Tsai8d5e6d62019-08-06 01:15:48 -070022 state protoimpl.MessageState
23 sizeCache protoimpl.SizeCache
24 unknownFields protoimpl.UnknownFields
25
Damien Neil5b6d0472019-06-14 11:54:07 -070026 OptionalMessage *IrregularMessage `protobuf:"bytes,1,opt,name=optional_message,json=optionalMessage" json:"optional_message,omitempty"`
27 RepeatedMessage []*IrregularMessage `protobuf:"bytes,2,rep,name=repeated_message,json=repeatedMessage" json:"repeated_message,omitempty"`
28 RequiredMessage *IrregularMessage `protobuf:"bytes,3,req,name=required_message,json=requiredMessage" json:"required_message,omitempty"`
29 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 -070030 // Types that are assignable to Union:
Damien Neil5b6d0472019-06-14 11:54:07 -070031 // *Message_OneofMessage
Joe Tsai38b61962019-08-05 13:09:30 -070032 Union isMessage_Union `protobuf_oneof:"union"`
Damien Neil5b6d0472019-06-14 11:54:07 -070033}
34
35func (x *Message) Reset() {
36 *x = Message{}
37}
38
39func (x *Message) String() string {
40 return protoimpl.X.MessageStringOf(x)
41}
42
43func (*Message) ProtoMessage() {}
44
45func (x *Message) ProtoReflect() protoreflect.Message {
Joe Tsai82760ce2019-06-20 03:09:57 -070046 mi := &file_irregular_test_proto_msgTypes[0]
47 if protoimpl.UnsafeEnabled && x != nil {
48 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
49 if ms.LoadMessageInfo() == nil {
50 ms.StoreMessageInfo(mi)
51 }
52 return ms
53 }
54 return mi.MessageOf(x)
Damien Neil5b6d0472019-06-14 11:54:07 -070055}
56
Joe Tsai43761bd2019-07-17 18:06:47 -070057// Deprecated: Use Message.ProtoReflect.Descriptor instead.
Damien Neil5b6d0472019-06-14 11:54:07 -070058func (*Message) Descriptor() ([]byte, []int) {
59 return file_irregular_test_proto_rawDescGZIP(), []int{0}
60}
61
62func (x *Message) GetOptionalMessage() *IrregularMessage {
63 if x != nil {
64 return x.OptionalMessage
65 }
66 return nil
67}
68
69func (x *Message) GetRepeatedMessage() []*IrregularMessage {
70 if x != nil {
71 return x.RepeatedMessage
72 }
73 return nil
74}
75
76func (x *Message) GetRequiredMessage() *IrregularMessage {
77 if x != nil {
78 return x.RequiredMessage
79 }
80 return nil
81}
82
83func (x *Message) GetMapMessage() map[string]*IrregularMessage {
84 if x != nil {
85 return x.MapMessage
86 }
87 return nil
88}
89
90func (m *Message) GetUnion() isMessage_Union {
91 if m != nil {
92 return m.Union
93 }
94 return nil
95}
96
97func (x *Message) GetOneofMessage() *IrregularMessage {
98 if x, ok := x.GetUnion().(*Message_OneofMessage); ok {
99 return x.OneofMessage
100 }
101 return nil
102}
103
Damien Neil5b6d0472019-06-14 11:54:07 -0700104type isMessage_Union interface {
105 isMessage_Union()
106}
107
108type Message_OneofMessage struct {
109 OneofMessage *IrregularMessage `protobuf:"bytes,5,opt,name=oneof_message,json=oneofMessage,oneof"`
110}
111
112func (*Message_OneofMessage) isMessage_Union() {}
113
114var File_irregular_test_proto protoreflect.FileDescriptor
115
116var file_irregular_test_proto_rawDesc = []byte{
117 0x0a, 0x14, 0x69, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x2f, 0x74, 0x65, 0x73, 0x74,
118 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
119 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x69, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x1a,
120 0x19, 0x69, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x2f, 0x69, 0x72, 0x72, 0x65, 0x67,
121 0x75, 0x6c, 0x61, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x04, 0x0a, 0x07, 0x4d,
122 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x54, 0x0a, 0x10, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
123 0x61, 0x6c, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
124 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
125 0x2e, 0x69, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x2e, 0x49, 0x72, 0x72, 0x65, 0x67,
126 0x75, 0x6c, 0x61, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0f, 0x6f, 0x70, 0x74,
127 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x54, 0x0a, 0x10,
128 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
129 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
130 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x69, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72,
131 0x2e, 0x49, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
132 0x65, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61,
133 0x67, 0x65, 0x12, 0x54, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x6d,
134 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67,
135 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x69, 0x72, 0x72,
136 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x2e, 0x49, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72,
137 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65,
138 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x51, 0x0a, 0x0b, 0x6d, 0x61, 0x70, 0x5f,
139 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e,
140 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x69, 0x72,
141 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e,
142 0x4d, 0x61, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
143 0x0a, 0x6d, 0x61, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x50, 0x0a, 0x0d, 0x6f,
144 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01,
145 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f,
146 0x74, 0x6f, 0x2e, 0x69, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x2e, 0x49, 0x72, 0x72,
147 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52,
148 0x0c, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x68, 0x0a,
149 0x0f, 0x4d, 0x61, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79,
150 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
151 0x65, 0x79, 0x12, 0x3f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
152 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74,
153 0x6f, 0x2e, 0x69, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x2e, 0x49, 0x72, 0x72, 0x65,
154 0x67, 0x75, 0x6c, 0x61, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x05, 0x76, 0x61,
155 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e,
156 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e,
157 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x69,
158 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74,
159 0x6f, 0x73, 0x2f, 0x69, 0x72, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72,
160}
161
162var (
163 file_irregular_test_proto_rawDescOnce sync.Once
164 file_irregular_test_proto_rawDescData = file_irregular_test_proto_rawDesc
165)
166
167func file_irregular_test_proto_rawDescGZIP() []byte {
168 file_irregular_test_proto_rawDescOnce.Do(func() {
169 file_irregular_test_proto_rawDescData = protoimpl.X.CompressGZIP(file_irregular_test_proto_rawDescData)
170 })
171 return file_irregular_test_proto_rawDescData
172}
173
174var file_irregular_test_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
175var file_irregular_test_proto_goTypes = []interface{}{
176 (*Message)(nil), // 0: goproto.proto.irregular.Message
177 nil, // 1: goproto.proto.irregular.Message.MapMessageEntry
178 (*IrregularMessage)(nil), // 2: goproto.proto.irregular.IrregularMessage
179}
180var file_irregular_test_proto_depIdxs = []int32{
Joe Tsai73288392019-08-14 11:55:31 -0700181 2, // 0: goproto.proto.irregular.Message.optional_message:type_name -> goproto.proto.irregular.IrregularMessage
182 2, // 1: goproto.proto.irregular.Message.repeated_message:type_name -> goproto.proto.irregular.IrregularMessage
183 2, // 2: goproto.proto.irregular.Message.required_message:type_name -> goproto.proto.irregular.IrregularMessage
184 1, // 3: goproto.proto.irregular.Message.map_message:type_name -> goproto.proto.irregular.Message.MapMessageEntry
185 2, // 4: goproto.proto.irregular.Message.oneof_message:type_name -> goproto.proto.irregular.IrregularMessage
186 2, // 5: goproto.proto.irregular.Message.MapMessageEntry.value:type_name -> goproto.proto.irregular.IrregularMessage
187 6, // [6:6] is the sub-list for method output_type
188 6, // [6:6] is the sub-list for method input_type
189 6, // [6:6] is the sub-list for extension type_name
190 6, // [6:6] is the sub-list for extension extendee
191 0, // [0:6] is the sub-list for field type_name
Damien Neil5b6d0472019-06-14 11:54:07 -0700192}
193
194func init() { file_irregular_test_proto_init() }
195func file_irregular_test_proto_init() {
196 if File_irregular_test_proto != nil {
197 return
198 }
199 file_irregular_irregular_proto_init()
Joe Tsaic0e4bb22019-07-06 13:05:11 -0700200 if !protoimpl.UnsafeEnabled {
201 file_irregular_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
202 switch v := v.(*Message); i {
Joe Tsai82760ce2019-06-20 03:09:57 -0700203 case 0:
204 return &v.state
Joe Tsai38b61962019-08-05 13:09:30 -0700205 case 1:
Joe Tsai82760ce2019-06-20 03:09:57 -0700206 return &v.sizeCache
Joe Tsai38b61962019-08-05 13:09:30 -0700207 case 2:
Joe Tsaic0e4bb22019-07-06 13:05:11 -0700208 return &v.unknownFields
209 default:
210 return nil
211 }
212 }
213 }
Joe Tsai09912272019-07-08 10:38:11 -0700214 file_irregular_test_proto_msgTypes[0].OneofWrappers = []interface{}{
215 (*Message_OneofMessage)(nil),
216 }
Joe Tsaiaf570872019-07-14 23:04:40 -0700217 type x struct{}
Joe Tsaid8881392019-06-06 13:01:53 -0700218 out := protoimpl.TypeBuilder{
219 File: protoimpl.DescBuilder{
Joe Tsaiaf570872019-07-14 23:04:40 -0700220 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
Joe Tsaid8881392019-06-06 13:01:53 -0700221 RawDescriptor: file_irregular_test_proto_rawDesc,
222 NumEnums: 0,
223 NumMessages: 2,
224 NumExtensions: 0,
225 NumServices: 0,
226 },
227 GoTypes: file_irregular_test_proto_goTypes,
228 DependencyIndexes: file_irregular_test_proto_depIdxs,
229 MessageInfos: file_irregular_test_proto_msgTypes,
230 }.Build()
231 File_irregular_test_proto = out.File
Damien Neil5b6d0472019-06-14 11:54:07 -0700232 file_irregular_test_proto_rawDesc = nil
233 file_irregular_test_proto_goTypes = nil
234 file_irregular_test_proto_depIdxs = nil
235}