Joe Tsai | 8d5e6d6 | 2019-08-06 01:15:48 -0700 | [diff] [blame] | 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 | |
| 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 Neil | 5b6d047 | 2019-06-14 11:54:07 -0700 | [diff] [blame] | 9 | // Code generated by protoc-gen-go. DO NOT EDIT. |
| 10 | // source: irregular/test.proto |
| 11 | |
| 12 | package irregular |
| 13 | |
| 14 | import ( |
| 15 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
Damien Neil | 5b6d047 | 2019-06-14 11:54:07 -0700 | [diff] [blame] | 16 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
Joe Tsai | af57087 | 2019-07-14 23:04:40 -0700 | [diff] [blame] | 17 | reflect "reflect" |
Damien Neil | 5b6d047 | 2019-06-14 11:54:07 -0700 | [diff] [blame] | 18 | sync "sync" |
| 19 | ) |
| 20 | |
Damien Neil | 5b6d047 | 2019-06-14 11:54:07 -0700 | [diff] [blame] | 21 | type Message struct { |
Joe Tsai | 8d5e6d6 | 2019-08-06 01:15:48 -0700 | [diff] [blame] | 22 | state protoimpl.MessageState |
| 23 | sizeCache protoimpl.SizeCache |
| 24 | unknownFields protoimpl.UnknownFields |
| 25 | |
Damien Neil | 5b6d047 | 2019-06-14 11:54:07 -0700 | [diff] [blame] | 26 | 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 Tsai | 8d5e6d6 | 2019-08-06 01:15:48 -0700 | [diff] [blame] | 30 | // Types that are assignable to Union: |
Damien Neil | 5b6d047 | 2019-06-14 11:54:07 -0700 | [diff] [blame] | 31 | // *Message_OneofMessage |
Joe Tsai | 38b6196 | 2019-08-05 13:09:30 -0700 | [diff] [blame] | 32 | Union isMessage_Union `protobuf_oneof:"union"` |
Damien Neil | 5b6d047 | 2019-06-14 11:54:07 -0700 | [diff] [blame] | 33 | } |
| 34 | |
| 35 | func (x *Message) Reset() { |
| 36 | *x = Message{} |
| 37 | } |
| 38 | |
| 39 | func (x *Message) String() string { |
| 40 | return protoimpl.X.MessageStringOf(x) |
| 41 | } |
| 42 | |
| 43 | func (*Message) ProtoMessage() {} |
| 44 | |
| 45 | func (x *Message) ProtoReflect() protoreflect.Message { |
Joe Tsai | 82760ce | 2019-06-20 03:09:57 -0700 | [diff] [blame] | 46 | 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 Neil | 5b6d047 | 2019-06-14 11:54:07 -0700 | [diff] [blame] | 55 | } |
| 56 | |
Joe Tsai | 43761bd | 2019-07-17 18:06:47 -0700 | [diff] [blame] | 57 | // Deprecated: Use Message.ProtoReflect.Descriptor instead. |
Damien Neil | 5b6d047 | 2019-06-14 11:54:07 -0700 | [diff] [blame] | 58 | func (*Message) Descriptor() ([]byte, []int) { |
| 59 | return file_irregular_test_proto_rawDescGZIP(), []int{0} |
| 60 | } |
| 61 | |
| 62 | func (x *Message) GetOptionalMessage() *IrregularMessage { |
| 63 | if x != nil { |
| 64 | return x.OptionalMessage |
| 65 | } |
| 66 | return nil |
| 67 | } |
| 68 | |
| 69 | func (x *Message) GetRepeatedMessage() []*IrregularMessage { |
| 70 | if x != nil { |
| 71 | return x.RepeatedMessage |
| 72 | } |
| 73 | return nil |
| 74 | } |
| 75 | |
| 76 | func (x *Message) GetRequiredMessage() *IrregularMessage { |
| 77 | if x != nil { |
| 78 | return x.RequiredMessage |
| 79 | } |
| 80 | return nil |
| 81 | } |
| 82 | |
| 83 | func (x *Message) GetMapMessage() map[string]*IrregularMessage { |
| 84 | if x != nil { |
| 85 | return x.MapMessage |
| 86 | } |
| 87 | return nil |
| 88 | } |
| 89 | |
| 90 | func (m *Message) GetUnion() isMessage_Union { |
| 91 | if m != nil { |
| 92 | return m.Union |
| 93 | } |
| 94 | return nil |
| 95 | } |
| 96 | |
| 97 | func (x *Message) GetOneofMessage() *IrregularMessage { |
| 98 | if x, ok := x.GetUnion().(*Message_OneofMessage); ok { |
| 99 | return x.OneofMessage |
| 100 | } |
| 101 | return nil |
| 102 | } |
| 103 | |
Damien Neil | 5b6d047 | 2019-06-14 11:54:07 -0700 | [diff] [blame] | 104 | type isMessage_Union interface { |
| 105 | isMessage_Union() |
| 106 | } |
| 107 | |
| 108 | type Message_OneofMessage struct { |
| 109 | OneofMessage *IrregularMessage `protobuf:"bytes,5,opt,name=oneof_message,json=oneofMessage,oneof"` |
| 110 | } |
| 111 | |
| 112 | func (*Message_OneofMessage) isMessage_Union() {} |
| 113 | |
| 114 | var File_irregular_test_proto protoreflect.FileDescriptor |
| 115 | |
| 116 | var 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 | |
| 162 | var ( |
| 163 | file_irregular_test_proto_rawDescOnce sync.Once |
| 164 | file_irregular_test_proto_rawDescData = file_irregular_test_proto_rawDesc |
| 165 | ) |
| 166 | |
| 167 | func 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 | |
| 174 | var file_irregular_test_proto_msgTypes = make([]protoimpl.MessageInfo, 2) |
| 175 | var 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 | } |
| 180 | var file_irregular_test_proto_depIdxs = []int32{ |
Joe Tsai | 7328839 | 2019-08-14 11:55:31 -0700 | [diff] [blame] | 181 | 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 Neil | 5b6d047 | 2019-06-14 11:54:07 -0700 | [diff] [blame] | 192 | } |
| 193 | |
| 194 | func init() { file_irregular_test_proto_init() } |
| 195 | func file_irregular_test_proto_init() { |
| 196 | if File_irregular_test_proto != nil { |
| 197 | return |
| 198 | } |
| 199 | file_irregular_irregular_proto_init() |
Joe Tsai | c0e4bb2 | 2019-07-06 13:05:11 -0700 | [diff] [blame] | 200 | if !protoimpl.UnsafeEnabled { |
| 201 | file_irregular_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { |
| 202 | switch v := v.(*Message); i { |
Joe Tsai | 82760ce | 2019-06-20 03:09:57 -0700 | [diff] [blame] | 203 | case 0: |
| 204 | return &v.state |
Joe Tsai | 38b6196 | 2019-08-05 13:09:30 -0700 | [diff] [blame] | 205 | case 1: |
Joe Tsai | 82760ce | 2019-06-20 03:09:57 -0700 | [diff] [blame] | 206 | return &v.sizeCache |
Joe Tsai | 38b6196 | 2019-08-05 13:09:30 -0700 | [diff] [blame] | 207 | case 2: |
Joe Tsai | c0e4bb2 | 2019-07-06 13:05:11 -0700 | [diff] [blame] | 208 | return &v.unknownFields |
| 209 | default: |
| 210 | return nil |
| 211 | } |
| 212 | } |
| 213 | } |
Joe Tsai | 0991227 | 2019-07-08 10:38:11 -0700 | [diff] [blame] | 214 | file_irregular_test_proto_msgTypes[0].OneofWrappers = []interface{}{ |
| 215 | (*Message_OneofMessage)(nil), |
| 216 | } |
Joe Tsai | af57087 | 2019-07-14 23:04:40 -0700 | [diff] [blame] | 217 | type x struct{} |
Joe Tsai | d888139 | 2019-06-06 13:01:53 -0700 | [diff] [blame] | 218 | out := protoimpl.TypeBuilder{ |
| 219 | File: protoimpl.DescBuilder{ |
Joe Tsai | af57087 | 2019-07-14 23:04:40 -0700 | [diff] [blame] | 220 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
Joe Tsai | d888139 | 2019-06-06 13:01:53 -0700 | [diff] [blame] | 221 | 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 Neil | 5b6d047 | 2019-06-14 11:54:07 -0700 | [diff] [blame] | 232 | file_irregular_test_proto_rawDesc = nil |
| 233 | file_irregular_test_proto_goTypes = nil |
| 234 | file_irregular_test_proto_depIdxs = nil |
| 235 | } |