Joe Tsai | 8d5e6d6 | 2019-08-06 01:15:48 -0700 | [diff] [blame] | 1 | // Copyright 2018 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 | // Different proto type definitions for testing the Types registry. |
| 6 | |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 7 | // Code generated by protoc-gen-go. DO NOT EDIT. |
Joe Tsai | 1905843 | 2019-02-27 21:46:29 -0800 | [diff] [blame] | 8 | // source: test.proto |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 9 | |
| 10 | package testprotos |
| 11 | |
| 12 | import ( |
Damien Neil | e89e624 | 2019-05-13 23:55:40 -0700 | [diff] [blame] | 13 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
Damien Neil | e89e624 | 2019-05-13 23:55:40 -0700 | [diff] [blame] | 14 | protoiface "google.golang.org/protobuf/runtime/protoiface" |
| 15 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
Joe Tsai | af57087 | 2019-07-14 23:04:40 -0700 | [diff] [blame] | 16 | reflect "reflect" |
Joe Tsai | 5d72cc2 | 2019-03-28 01:13:26 -0700 | [diff] [blame] | 17 | sync "sync" |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 18 | ) |
| 19 | |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 20 | type Enum1 int32 |
| 21 | |
| 22 | const ( |
| 23 | Enum1_ONE Enum1 = 1 |
| 24 | ) |
| 25 | |
Joe Tsai | 9b8a433 | 2019-08-05 18:38:48 -0700 | [diff] [blame] | 26 | // Enum value maps for Enum1. |
| 27 | var ( |
| 28 | Enum1_name = map[int32]string{ |
| 29 | 1: "ONE", |
| 30 | } |
| 31 | Enum1_value = map[string]int32{ |
| 32 | "ONE": 1, |
| 33 | } |
| 34 | ) |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 35 | |
| 36 | func (x Enum1) Enum() *Enum1 { |
Joe Tsai | 09b5b46 | 2019-04-10 15:29:01 -0700 | [diff] [blame] | 37 | p := new(Enum1) |
| 38 | *p = x |
| 39 | return p |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 40 | } |
| 41 | |
| 42 | func (x Enum1) String() string { |
Joe Tsai | 0fc49f8 | 2019-05-01 12:29:25 -0700 | [diff] [blame] | 43 | return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 44 | } |
| 45 | |
Joe Tsai | 0fc49f8 | 2019-05-01 12:29:25 -0700 | [diff] [blame] | 46 | func (Enum1) Descriptor() protoreflect.EnumDescriptor { |
Damien Neil | 4401a0d | 2019-08-06 15:26:36 -0700 | [diff] [blame] | 47 | return file_test_proto_enumTypes[0].Descriptor() |
Joe Tsai | 0fc49f8 | 2019-05-01 12:29:25 -0700 | [diff] [blame] | 48 | } |
| 49 | |
Joe Tsai | d421150 | 2019-07-02 14:58:02 -0700 | [diff] [blame] | 50 | func (Enum1) Type() protoreflect.EnumType { |
| 51 | return &file_test_proto_enumTypes[0] |
| 52 | } |
| 53 | |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 54 | func (x Enum1) Number() protoreflect.EnumNumber { |
| 55 | return protoreflect.EnumNumber(x) |
| 56 | } |
| 57 | |
Joe Tsai | 8e506a8 | 2019-03-16 00:05:34 -0700 | [diff] [blame] | 58 | // Deprecated: Do not use. |
| 59 | func (x *Enum1) UnmarshalJSON(b []byte) error { |
Joe Tsai | 0fc49f8 | 2019-05-01 12:29:25 -0700 | [diff] [blame] | 60 | num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 61 | if err != nil { |
| 62 | return err |
| 63 | } |
Joe Tsai | 8e506a8 | 2019-03-16 00:05:34 -0700 | [diff] [blame] | 64 | *x = Enum1(num) |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 65 | return nil |
| 66 | } |
| 67 | |
Joe Tsai | 43761bd | 2019-07-17 18:06:47 -0700 | [diff] [blame] | 68 | // Deprecated: Use Enum1.Descriptor instead. |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 69 | func (Enum1) EnumDescriptor() ([]byte, []int) { |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 70 | return file_test_proto_rawDescGZIP(), []int{0} |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 71 | } |
| 72 | |
| 73 | type Enum2 int32 |
| 74 | |
| 75 | const ( |
| 76 | Enum2_UNO Enum2 = 1 |
| 77 | ) |
| 78 | |
Joe Tsai | 9b8a433 | 2019-08-05 18:38:48 -0700 | [diff] [blame] | 79 | // Enum value maps for Enum2. |
| 80 | var ( |
| 81 | Enum2_name = map[int32]string{ |
| 82 | 1: "UNO", |
| 83 | } |
| 84 | Enum2_value = map[string]int32{ |
| 85 | "UNO": 1, |
| 86 | } |
| 87 | ) |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 88 | |
| 89 | func (x Enum2) Enum() *Enum2 { |
Joe Tsai | 09b5b46 | 2019-04-10 15:29:01 -0700 | [diff] [blame] | 90 | p := new(Enum2) |
| 91 | *p = x |
| 92 | return p |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 93 | } |
| 94 | |
| 95 | func (x Enum2) String() string { |
Joe Tsai | 0fc49f8 | 2019-05-01 12:29:25 -0700 | [diff] [blame] | 96 | return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 97 | } |
| 98 | |
Joe Tsai | 0fc49f8 | 2019-05-01 12:29:25 -0700 | [diff] [blame] | 99 | func (Enum2) Descriptor() protoreflect.EnumDescriptor { |
Damien Neil | 4401a0d | 2019-08-06 15:26:36 -0700 | [diff] [blame] | 100 | return file_test_proto_enumTypes[1].Descriptor() |
Joe Tsai | 0fc49f8 | 2019-05-01 12:29:25 -0700 | [diff] [blame] | 101 | } |
| 102 | |
Joe Tsai | d421150 | 2019-07-02 14:58:02 -0700 | [diff] [blame] | 103 | func (Enum2) Type() protoreflect.EnumType { |
| 104 | return &file_test_proto_enumTypes[1] |
| 105 | } |
| 106 | |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 107 | func (x Enum2) Number() protoreflect.EnumNumber { |
| 108 | return protoreflect.EnumNumber(x) |
| 109 | } |
| 110 | |
Joe Tsai | 8e506a8 | 2019-03-16 00:05:34 -0700 | [diff] [blame] | 111 | // Deprecated: Do not use. |
| 112 | func (x *Enum2) UnmarshalJSON(b []byte) error { |
Joe Tsai | 0fc49f8 | 2019-05-01 12:29:25 -0700 | [diff] [blame] | 113 | num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 114 | if err != nil { |
| 115 | return err |
| 116 | } |
Joe Tsai | 8e506a8 | 2019-03-16 00:05:34 -0700 | [diff] [blame] | 117 | *x = Enum2(num) |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 118 | return nil |
| 119 | } |
| 120 | |
Joe Tsai | 43761bd | 2019-07-17 18:06:47 -0700 | [diff] [blame] | 121 | // Deprecated: Use Enum2.Descriptor instead. |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 122 | func (Enum2) EnumDescriptor() ([]byte, []int) { |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 123 | return file_test_proto_rawDescGZIP(), []int{1} |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 124 | } |
| 125 | |
| 126 | type Enum3 int32 |
| 127 | |
| 128 | const ( |
| 129 | Enum3_YI Enum3 = 1 |
| 130 | ) |
| 131 | |
Joe Tsai | 9b8a433 | 2019-08-05 18:38:48 -0700 | [diff] [blame] | 132 | // Enum value maps for Enum3. |
| 133 | var ( |
| 134 | Enum3_name = map[int32]string{ |
| 135 | 1: "YI", |
| 136 | } |
| 137 | Enum3_value = map[string]int32{ |
| 138 | "YI": 1, |
| 139 | } |
| 140 | ) |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 141 | |
| 142 | func (x Enum3) Enum() *Enum3 { |
Joe Tsai | 09b5b46 | 2019-04-10 15:29:01 -0700 | [diff] [blame] | 143 | p := new(Enum3) |
| 144 | *p = x |
| 145 | return p |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 146 | } |
| 147 | |
| 148 | func (x Enum3) String() string { |
Joe Tsai | 0fc49f8 | 2019-05-01 12:29:25 -0700 | [diff] [blame] | 149 | return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 150 | } |
| 151 | |
Joe Tsai | 0fc49f8 | 2019-05-01 12:29:25 -0700 | [diff] [blame] | 152 | func (Enum3) Descriptor() protoreflect.EnumDescriptor { |
Damien Neil | 4401a0d | 2019-08-06 15:26:36 -0700 | [diff] [blame] | 153 | return file_test_proto_enumTypes[2].Descriptor() |
Joe Tsai | 0fc49f8 | 2019-05-01 12:29:25 -0700 | [diff] [blame] | 154 | } |
| 155 | |
Joe Tsai | d421150 | 2019-07-02 14:58:02 -0700 | [diff] [blame] | 156 | func (Enum3) Type() protoreflect.EnumType { |
| 157 | return &file_test_proto_enumTypes[2] |
| 158 | } |
| 159 | |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 160 | func (x Enum3) Number() protoreflect.EnumNumber { |
| 161 | return protoreflect.EnumNumber(x) |
| 162 | } |
| 163 | |
Joe Tsai | 8e506a8 | 2019-03-16 00:05:34 -0700 | [diff] [blame] | 164 | // Deprecated: Do not use. |
| 165 | func (x *Enum3) UnmarshalJSON(b []byte) error { |
Joe Tsai | 0fc49f8 | 2019-05-01 12:29:25 -0700 | [diff] [blame] | 166 | num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 167 | if err != nil { |
| 168 | return err |
| 169 | } |
Joe Tsai | 8e506a8 | 2019-03-16 00:05:34 -0700 | [diff] [blame] | 170 | *x = Enum3(num) |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 171 | return nil |
| 172 | } |
| 173 | |
Joe Tsai | 43761bd | 2019-07-17 18:06:47 -0700 | [diff] [blame] | 174 | // Deprecated: Use Enum3.Descriptor instead. |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 175 | func (Enum3) EnumDescriptor() ([]byte, []int) { |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 176 | return file_test_proto_rawDescGZIP(), []int{2} |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 177 | } |
| 178 | |
| 179 | type Message1 struct { |
Joe Tsai | 82760ce | 2019-06-20 03:09:57 -0700 | [diff] [blame] | 180 | state protoimpl.MessageState |
Joe Tsai | c0e4bb2 | 2019-07-06 13:05:11 -0700 | [diff] [blame] | 181 | sizeCache protoimpl.SizeCache |
| 182 | unknownFields protoimpl.UnknownFields |
Joe Tsai | 6ceeaab | 2019-07-08 12:31:21 -0700 | [diff] [blame] | 183 | extensionFields protoimpl.ExtensionFields |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 184 | } |
| 185 | |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 186 | func (x *Message1) Reset() { |
| 187 | *x = Message1{} |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 188 | } |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 189 | |
| 190 | func (x *Message1) String() string { |
| 191 | return protoimpl.X.MessageStringOf(x) |
| 192 | } |
| 193 | |
| 194 | func (*Message1) ProtoMessage() {} |
| 195 | |
| 196 | func (x *Message1) ProtoReflect() protoreflect.Message { |
Joe Tsai | 82760ce | 2019-06-20 03:09:57 -0700 | [diff] [blame] | 197 | mi := &file_test_proto_msgTypes[0] |
| 198 | if protoimpl.UnsafeEnabled && x != nil { |
| 199 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 200 | if ms.LoadMessageInfo() == nil { |
| 201 | ms.StoreMessageInfo(mi) |
| 202 | } |
| 203 | return ms |
| 204 | } |
| 205 | return mi.MessageOf(x) |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 206 | } |
Joe Tsai | 8e506a8 | 2019-03-16 00:05:34 -0700 | [diff] [blame] | 207 | |
Joe Tsai | 43761bd | 2019-07-17 18:06:47 -0700 | [diff] [blame] | 208 | // Deprecated: Use Message1.ProtoReflect.Descriptor instead. |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 209 | func (*Message1) Descriptor() ([]byte, []int) { |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 210 | return file_test_proto_rawDescGZIP(), []int{0} |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 211 | } |
| 212 | |
Joe Tsai | 4fddeba | 2019-03-20 18:29:32 -0700 | [diff] [blame] | 213 | var extRange_Message1 = []protoiface.ExtensionRangeV1{ |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 214 | {Start: 10, End: 536870911}, |
| 215 | } |
| 216 | |
Joe Tsai | 43761bd | 2019-07-17 18:06:47 -0700 | [diff] [blame] | 217 | // Deprecated: Use Message1.ProtoReflect.Descriptor.ExtensionRanges instead. |
Joe Tsai | 4fddeba | 2019-03-20 18:29:32 -0700 | [diff] [blame] | 218 | func (*Message1) ExtensionRangeArray() []protoiface.ExtensionRangeV1 { |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 219 | return extRange_Message1 |
| 220 | } |
| 221 | |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 222 | type Message2 struct { |
Joe Tsai | 82760ce | 2019-06-20 03:09:57 -0700 | [diff] [blame] | 223 | state protoimpl.MessageState |
Joe Tsai | c0e4bb2 | 2019-07-06 13:05:11 -0700 | [diff] [blame] | 224 | sizeCache protoimpl.SizeCache |
| 225 | unknownFields protoimpl.UnknownFields |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 226 | } |
| 227 | |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 228 | func (x *Message2) Reset() { |
| 229 | *x = Message2{} |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 230 | } |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 231 | |
| 232 | func (x *Message2) String() string { |
| 233 | return protoimpl.X.MessageStringOf(x) |
| 234 | } |
| 235 | |
| 236 | func (*Message2) ProtoMessage() {} |
| 237 | |
| 238 | func (x *Message2) ProtoReflect() protoreflect.Message { |
Joe Tsai | 82760ce | 2019-06-20 03:09:57 -0700 | [diff] [blame] | 239 | mi := &file_test_proto_msgTypes[1] |
| 240 | if protoimpl.UnsafeEnabled && x != nil { |
| 241 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 242 | if ms.LoadMessageInfo() == nil { |
| 243 | ms.StoreMessageInfo(mi) |
| 244 | } |
| 245 | return ms |
| 246 | } |
| 247 | return mi.MessageOf(x) |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 248 | } |
Joe Tsai | 8e506a8 | 2019-03-16 00:05:34 -0700 | [diff] [blame] | 249 | |
Joe Tsai | 43761bd | 2019-07-17 18:06:47 -0700 | [diff] [blame] | 250 | // Deprecated: Use Message2.ProtoReflect.Descriptor instead. |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 251 | func (*Message2) Descriptor() ([]byte, []int) { |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 252 | return file_test_proto_rawDescGZIP(), []int{1} |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 253 | } |
| 254 | |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 255 | type Message3 struct { |
Joe Tsai | 82760ce | 2019-06-20 03:09:57 -0700 | [diff] [blame] | 256 | state protoimpl.MessageState |
Joe Tsai | c0e4bb2 | 2019-07-06 13:05:11 -0700 | [diff] [blame] | 257 | sizeCache protoimpl.SizeCache |
| 258 | unknownFields protoimpl.UnknownFields |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 259 | } |
| 260 | |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 261 | func (x *Message3) Reset() { |
| 262 | *x = Message3{} |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 263 | } |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 264 | |
| 265 | func (x *Message3) String() string { |
| 266 | return protoimpl.X.MessageStringOf(x) |
| 267 | } |
| 268 | |
| 269 | func (*Message3) ProtoMessage() {} |
| 270 | |
| 271 | func (x *Message3) ProtoReflect() protoreflect.Message { |
Joe Tsai | 82760ce | 2019-06-20 03:09:57 -0700 | [diff] [blame] | 272 | mi := &file_test_proto_msgTypes[2] |
| 273 | if protoimpl.UnsafeEnabled && x != nil { |
| 274 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 275 | if ms.LoadMessageInfo() == nil { |
| 276 | ms.StoreMessageInfo(mi) |
| 277 | } |
| 278 | return ms |
| 279 | } |
| 280 | return mi.MessageOf(x) |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 281 | } |
Joe Tsai | 8e506a8 | 2019-03-16 00:05:34 -0700 | [diff] [blame] | 282 | |
Joe Tsai | 43761bd | 2019-07-17 18:06:47 -0700 | [diff] [blame] | 283 | // Deprecated: Use Message3.ProtoReflect.Descriptor instead. |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 284 | func (*Message3) Descriptor() ([]byte, []int) { |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 285 | return file_test_proto_rawDescGZIP(), []int{2} |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 286 | } |
| 287 | |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 288 | type Message4 struct { |
Joe Tsai | 82760ce | 2019-06-20 03:09:57 -0700 | [diff] [blame] | 289 | state protoimpl.MessageState |
Joe Tsai | c0e4bb2 | 2019-07-06 13:05:11 -0700 | [diff] [blame] | 290 | sizeCache protoimpl.SizeCache |
| 291 | unknownFields protoimpl.UnknownFields |
Joe Tsai | 8d5e6d6 | 2019-08-06 01:15:48 -0700 | [diff] [blame] | 292 | |
| 293 | BoolField *bool `protobuf:"varint,30,opt,name=bool_field,json=boolField" json:"bool_field,omitempty"` |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 294 | } |
| 295 | |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 296 | func (x *Message4) Reset() { |
| 297 | *x = Message4{} |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 298 | } |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 299 | |
| 300 | func (x *Message4) String() string { |
| 301 | return protoimpl.X.MessageStringOf(x) |
| 302 | } |
| 303 | |
| 304 | func (*Message4) ProtoMessage() {} |
| 305 | |
| 306 | func (x *Message4) ProtoReflect() protoreflect.Message { |
Joe Tsai | 82760ce | 2019-06-20 03:09:57 -0700 | [diff] [blame] | 307 | mi := &file_test_proto_msgTypes[3] |
| 308 | if protoimpl.UnsafeEnabled && x != nil { |
| 309 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 310 | if ms.LoadMessageInfo() == nil { |
| 311 | ms.StoreMessageInfo(mi) |
| 312 | } |
| 313 | return ms |
| 314 | } |
| 315 | return mi.MessageOf(x) |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 316 | } |
Joe Tsai | 8e506a8 | 2019-03-16 00:05:34 -0700 | [diff] [blame] | 317 | |
Joe Tsai | 43761bd | 2019-07-17 18:06:47 -0700 | [diff] [blame] | 318 | // Deprecated: Use Message4.ProtoReflect.Descriptor instead. |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 319 | func (*Message4) Descriptor() ([]byte, []int) { |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 320 | return file_test_proto_rawDescGZIP(), []int{3} |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 321 | } |
| 322 | |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 323 | func (x *Message4) GetBoolField() bool { |
| 324 | if x != nil && x.BoolField != nil { |
| 325 | return *x.BoolField |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 326 | } |
| 327 | return false |
| 328 | } |
| 329 | |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 330 | var file_test_proto_extDescs = []protoiface.ExtensionDescV1{ |
Joe Tsai | afb455e | 2019-03-14 16:08:22 -0700 | [diff] [blame] | 331 | { |
| 332 | ExtendedType: (*Message1)(nil), |
| 333 | ExtensionType: (*string)(nil), |
| 334 | Field: 11, |
| 335 | Name: "testprotos.string_field", |
| 336 | Tag: "bytes,11,opt,name=string_field", |
| 337 | Filename: "test.proto", |
| 338 | }, |
| 339 | { |
| 340 | ExtendedType: (*Message1)(nil), |
| 341 | ExtensionType: (*Enum1)(nil), |
| 342 | Field: 12, |
| 343 | Name: "testprotos.enum_field", |
| 344 | Tag: "varint,12,opt,name=enum_field,enum=testprotos.Enum1", |
| 345 | Filename: "test.proto", |
| 346 | }, |
| 347 | { |
| 348 | ExtendedType: (*Message1)(nil), |
| 349 | ExtensionType: (*Message2)(nil), |
| 350 | Field: 13, |
| 351 | Name: "testprotos.message_field", |
| 352 | Tag: "bytes,13,opt,name=message_field", |
| 353 | Filename: "test.proto", |
| 354 | }, |
| 355 | { |
| 356 | ExtendedType: (*Message1)(nil), |
| 357 | ExtensionType: (*Message2)(nil), |
| 358 | Field: 21, |
| 359 | Name: "testprotos.Message4.message_field", |
| 360 | Tag: "bytes,21,opt,name=message_field", |
| 361 | Filename: "test.proto", |
| 362 | }, |
| 363 | { |
| 364 | ExtendedType: (*Message1)(nil), |
| 365 | ExtensionType: (*Enum1)(nil), |
| 366 | Field: 22, |
| 367 | Name: "testprotos.Message4.enum_field", |
| 368 | Tag: "varint,22,opt,name=enum_field,enum=testprotos.Enum1", |
| 369 | Filename: "test.proto", |
| 370 | }, |
| 371 | { |
| 372 | ExtendedType: (*Message1)(nil), |
| 373 | ExtensionType: (*string)(nil), |
| 374 | Field: 23, |
| 375 | Name: "testprotos.Message4.string_field", |
| 376 | Tag: "bytes,23,opt,name=string_field", |
| 377 | Filename: "test.proto", |
| 378 | }, |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 379 | } |
Joe Tsai | 4a7d633 | 2019-08-06 16:45:11 -0700 | [diff] [blame] | 380 | |
| 381 | // Extension fields to Message1. |
Joe Tsai | afb455e | 2019-03-14 16:08:22 -0700 | [diff] [blame] | 382 | var ( |
Joe Tsai | 4a7d633 | 2019-08-06 16:45:11 -0700 | [diff] [blame] | 383 | // optional string string_field = 11; |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 384 | E_StringField = &file_test_proto_extDescs[0] |
Joe Tsai | 4a7d633 | 2019-08-06 16:45:11 -0700 | [diff] [blame] | 385 | // optional testprotos.Enum1 enum_field = 12; |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 386 | E_EnumField = &file_test_proto_extDescs[1] |
Joe Tsai | 4a7d633 | 2019-08-06 16:45:11 -0700 | [diff] [blame] | 387 | // optional testprotos.Message2 message_field = 13; |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 388 | E_MessageField = &file_test_proto_extDescs[2] |
Joe Tsai | 4a7d633 | 2019-08-06 16:45:11 -0700 | [diff] [blame] | 389 | // optional testprotos.Message2 message_field = 21; |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 390 | E_Message4_MessageField = &file_test_proto_extDescs[3] |
Joe Tsai | 4a7d633 | 2019-08-06 16:45:11 -0700 | [diff] [blame] | 391 | // optional testprotos.Enum1 enum_field = 22; |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 392 | E_Message4_EnumField = &file_test_proto_extDescs[4] |
Joe Tsai | 4a7d633 | 2019-08-06 16:45:11 -0700 | [diff] [blame] | 393 | // optional string string_field = 23; |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 394 | E_Message4_StringField = &file_test_proto_extDescs[5] |
Joe Tsai | afb455e | 2019-03-14 16:08:22 -0700 | [diff] [blame] | 395 | ) |
Joe Tsai | 4a7d633 | 2019-08-06 16:45:11 -0700 | [diff] [blame] | 396 | |
Joe Tsai | 5d72cc2 | 2019-03-28 01:13:26 -0700 | [diff] [blame] | 397 | var File_test_proto protoreflect.FileDescriptor |
| 398 | |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 399 | var file_test_proto_rawDesc = []byte{ |
Joe Tsai | 1905843 | 2019-02-27 21:46:29 -0800 | [diff] [blame] | 400 | 0x0a, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x74, 0x65, |
| 401 | 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0x14, 0x0a, 0x08, 0x4d, 0x65, 0x73, 0x73, |
| 402 | 0x61, 0x67, 0x65, 0x31, 0x2a, 0x08, 0x08, 0x0a, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x0a, |
| 403 | 0x0a, 0x08, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x22, 0x0a, 0x0a, 0x08, 0x4d, 0x65, |
| 404 | 0x73, 0x73, 0x61, 0x67, 0x65, 0x33, 0x22, 0xfb, 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x73, 0x73, 0x61, |
| 405 | 0x67, 0x65, 0x34, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, |
| 406 | 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x46, 0x69, 0x65, |
| 407 | 0x6c, 0x64, 0x32, 0x4f, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x66, 0x69, |
| 408 | 0x65, 0x6c, 0x64, 0x12, 0x14, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, |
| 409 | 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x31, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, |
| 410 | 0x14, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, 0x65, 0x73, |
| 411 | 0x73, 0x61, 0x67, 0x65, 0x32, 0x52, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x46, 0x69, |
| 412 | 0x65, 0x6c, 0x64, 0x32, 0x46, 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x66, 0x69, 0x65, 0x6c, |
Damien Neil | 8012b44 | 2019-01-18 09:32:24 -0800 | [diff] [blame] | 413 | 0x64, 0x12, 0x14, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, |
Joe Tsai | 1905843 | 2019-02-27 21:46:29 -0800 | [diff] [blame] | 414 | 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x31, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, |
Damien Neil | 8012b44 | 2019-01-18 09:32:24 -0800 | [diff] [blame] | 415 | 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x31, |
Joe Tsai | 1905843 | 2019-02-27 21:46:29 -0800 | [diff] [blame] | 416 | 0x52, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x32, 0x37, 0x0a, 0x0c, 0x73, |
| 417 | 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x14, 0x2e, 0x74, 0x65, |
| 418 | 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, |
| 419 | 0x31, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, |
| 420 | 0x69, 0x65, 0x6c, 0x64, 0x2a, 0x10, 0x0a, 0x05, 0x45, 0x6e, 0x75, 0x6d, 0x31, 0x12, 0x07, 0x0a, |
| 421 | 0x03, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x2a, 0x10, 0x0a, 0x05, 0x45, 0x6e, 0x75, 0x6d, 0x32, 0x12, |
| 422 | 0x07, 0x0a, 0x03, 0x55, 0x4e, 0x4f, 0x10, 0x01, 0x2a, 0x0f, 0x0a, 0x05, 0x45, 0x6e, 0x75, 0x6d, |
| 423 | 0x33, 0x12, 0x06, 0x0a, 0x02, 0x59, 0x49, 0x10, 0x01, 0x3a, 0x37, 0x0a, 0x0c, 0x73, 0x74, 0x72, |
| 424 | 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x14, 0x2e, 0x74, 0x65, 0x73, 0x74, |
| 425 | 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x31, 0x18, |
| 426 | 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x65, |
| 427 | 0x6c, 0x64, 0x3a, 0x46, 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, |
| 428 | 0x12, 0x14, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, 0x65, |
| 429 | 0x73, 0x73, 0x61, 0x67, 0x65, 0x31, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x74, |
| 430 | 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x31, 0x52, |
| 431 | 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x4f, 0x0a, 0x0d, 0x6d, 0x65, |
| 432 | 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x14, 0x2e, 0x74, 0x65, |
| 433 | 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, |
| 434 | 0x31, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, |
| 435 | 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x52, 0x0c, 0x6d, |
Damien Neil | e89e624 | 2019-05-13 23:55:40 -0700 | [diff] [blame] | 436 | 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x3d, 0x5a, 0x3b, 0x67, |
| 437 | 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, |
| 438 | 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, |
| 439 | 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, |
| 440 | 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 441 | } |
| 442 | |
Joe Tsai | 5d72cc2 | 2019-03-28 01:13:26 -0700 | [diff] [blame] | 443 | var ( |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 444 | file_test_proto_rawDescOnce sync.Once |
| 445 | file_test_proto_rawDescData = file_test_proto_rawDesc |
Joe Tsai | 5d72cc2 | 2019-03-28 01:13:26 -0700 | [diff] [blame] | 446 | ) |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 447 | |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 448 | func file_test_proto_rawDescGZIP() []byte { |
| 449 | file_test_proto_rawDescOnce.Do(func() { |
| 450 | file_test_proto_rawDescData = protoimpl.X.CompressGZIP(file_test_proto_rawDescData) |
Joe Tsai | 5d72cc2 | 2019-03-28 01:13:26 -0700 | [diff] [blame] | 451 | }) |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 452 | return file_test_proto_rawDescData |
Joe Tsai | 5d72cc2 | 2019-03-28 01:13:26 -0700 | [diff] [blame] | 453 | } |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 454 | |
Damien Neil | 4401a0d | 2019-08-06 15:26:36 -0700 | [diff] [blame] | 455 | var file_test_proto_enumTypes = make([]protoimpl.EnumInfo, 3) |
Joe Tsai | 4fe9663 | 2019-05-22 05:12:36 -0400 | [diff] [blame] | 456 | var file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 4) |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 457 | var file_test_proto_goTypes = []interface{}{ |
Damien Neil | 8012b44 | 2019-01-18 09:32:24 -0800 | [diff] [blame] | 458 | (Enum1)(0), // 0: testprotos.Enum1 |
| 459 | (Enum2)(0), // 1: testprotos.Enum2 |
| 460 | (Enum3)(0), // 2: testprotos.Enum3 |
| 461 | (*Message1)(nil), // 3: testprotos.Message1 |
| 462 | (*Message2)(nil), // 4: testprotos.Message2 |
| 463 | (*Message3)(nil), // 5: testprotos.Message3 |
| 464 | (*Message4)(nil), // 6: testprotos.Message4 |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 465 | } |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 466 | var file_test_proto_depIdxs = []int32{ |
Joe Tsai | 7328839 | 2019-08-14 11:55:31 -0700 | [diff] [blame^] | 467 | 3, // 0: testprotos.string_field:extendee -> testprotos.Message1 |
| 468 | 3, // 1: testprotos.enum_field:extendee -> testprotos.Message1 |
| 469 | 3, // 2: testprotos.message_field:extendee -> testprotos.Message1 |
| 470 | 3, // 3: testprotos.Message4.message_field:extendee -> testprotos.Message1 |
| 471 | 3, // 4: testprotos.Message4.enum_field:extendee -> testprotos.Message1 |
| 472 | 3, // 5: testprotos.Message4.string_field:extendee -> testprotos.Message1 |
| 473 | 0, // 6: testprotos.enum_field:type_name -> testprotos.Enum1 |
| 474 | 4, // 7: testprotos.message_field:type_name -> testprotos.Message2 |
| 475 | 4, // 8: testprotos.Message4.message_field:type_name -> testprotos.Message2 |
| 476 | 0, // 9: testprotos.Message4.enum_field:type_name -> testprotos.Enum1 |
| 477 | 10, // [10:10] is the sub-list for method output_type |
| 478 | 10, // [10:10] is the sub-list for method input_type |
| 479 | 6, // [6:10] is the sub-list for extension type_name |
| 480 | 0, // [0:6] is the sub-list for extension extendee |
| 481 | 0, // [0:0] is the sub-list for field type_name |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 482 | } |
Damien Neil | 8012b44 | 2019-01-18 09:32:24 -0800 | [diff] [blame] | 483 | |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 484 | func init() { file_test_proto_init() } |
| 485 | func file_test_proto_init() { |
Damien Neil | 0fc2245 | 2019-03-08 17:18:11 -0800 | [diff] [blame] | 486 | if File_test_proto != nil { |
| 487 | return |
| 488 | } |
Joe Tsai | c0e4bb2 | 2019-07-06 13:05:11 -0700 | [diff] [blame] | 489 | if !protoimpl.UnsafeEnabled { |
| 490 | file_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { |
| 491 | switch v := v.(*Message1); i { |
| 492 | case 0: |
Joe Tsai | 82760ce | 2019-06-20 03:09:57 -0700 | [diff] [blame] | 493 | return &v.state |
Joe Tsai | c0e4bb2 | 2019-07-06 13:05:11 -0700 | [diff] [blame] | 494 | case 1: |
Joe Tsai | 82760ce | 2019-06-20 03:09:57 -0700 | [diff] [blame] | 495 | return &v.sizeCache |
Joe Tsai | c0e4bb2 | 2019-07-06 13:05:11 -0700 | [diff] [blame] | 496 | case 2: |
Joe Tsai | 82760ce | 2019-06-20 03:09:57 -0700 | [diff] [blame] | 497 | return &v.unknownFields |
| 498 | case 3: |
Joe Tsai | c0e4bb2 | 2019-07-06 13:05:11 -0700 | [diff] [blame] | 499 | return &v.extensionFields |
| 500 | default: |
| 501 | return nil |
| 502 | } |
| 503 | } |
| 504 | file_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { |
| 505 | switch v := v.(*Message2); i { |
| 506 | case 0: |
Joe Tsai | 82760ce | 2019-06-20 03:09:57 -0700 | [diff] [blame] | 507 | return &v.state |
Joe Tsai | c0e4bb2 | 2019-07-06 13:05:11 -0700 | [diff] [blame] | 508 | case 1: |
Joe Tsai | 82760ce | 2019-06-20 03:09:57 -0700 | [diff] [blame] | 509 | return &v.sizeCache |
| 510 | case 2: |
Joe Tsai | c0e4bb2 | 2019-07-06 13:05:11 -0700 | [diff] [blame] | 511 | return &v.unknownFields |
| 512 | default: |
| 513 | return nil |
| 514 | } |
| 515 | } |
| 516 | file_test_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { |
| 517 | switch v := v.(*Message3); i { |
| 518 | case 0: |
Joe Tsai | 82760ce | 2019-06-20 03:09:57 -0700 | [diff] [blame] | 519 | return &v.state |
Joe Tsai | c0e4bb2 | 2019-07-06 13:05:11 -0700 | [diff] [blame] | 520 | case 1: |
Joe Tsai | 82760ce | 2019-06-20 03:09:57 -0700 | [diff] [blame] | 521 | return &v.sizeCache |
| 522 | case 2: |
Joe Tsai | c0e4bb2 | 2019-07-06 13:05:11 -0700 | [diff] [blame] | 523 | return &v.unknownFields |
| 524 | default: |
| 525 | return nil |
| 526 | } |
| 527 | } |
| 528 | file_test_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { |
| 529 | switch v := v.(*Message4); i { |
Joe Tsai | 82760ce | 2019-06-20 03:09:57 -0700 | [diff] [blame] | 530 | case 0: |
| 531 | return &v.state |
Joe Tsai | 38b6196 | 2019-08-05 13:09:30 -0700 | [diff] [blame] | 532 | case 1: |
Joe Tsai | 82760ce | 2019-06-20 03:09:57 -0700 | [diff] [blame] | 533 | return &v.sizeCache |
Joe Tsai | 38b6196 | 2019-08-05 13:09:30 -0700 | [diff] [blame] | 534 | case 2: |
Joe Tsai | c0e4bb2 | 2019-07-06 13:05:11 -0700 | [diff] [blame] | 535 | return &v.unknownFields |
| 536 | default: |
| 537 | return nil |
| 538 | } |
| 539 | } |
| 540 | } |
Joe Tsai | af57087 | 2019-07-14 23:04:40 -0700 | [diff] [blame] | 541 | type x struct{} |
Joe Tsai | d888139 | 2019-06-06 13:01:53 -0700 | [diff] [blame] | 542 | out := protoimpl.TypeBuilder{ |
| 543 | File: protoimpl.DescBuilder{ |
Joe Tsai | af57087 | 2019-07-14 23:04:40 -0700 | [diff] [blame] | 544 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
Joe Tsai | d888139 | 2019-06-06 13:01:53 -0700 | [diff] [blame] | 545 | RawDescriptor: file_test_proto_rawDesc, |
| 546 | NumEnums: 3, |
| 547 | NumMessages: 4, |
| 548 | NumExtensions: 6, |
| 549 | NumServices: 0, |
| 550 | }, |
| 551 | GoTypes: file_test_proto_goTypes, |
| 552 | DependencyIndexes: file_test_proto_depIdxs, |
Damien Neil | 4401a0d | 2019-08-06 15:26:36 -0700 | [diff] [blame] | 553 | EnumInfos: file_test_proto_enumTypes, |
Joe Tsai | d888139 | 2019-06-06 13:01:53 -0700 | [diff] [blame] | 554 | MessageInfos: file_test_proto_msgTypes, |
| 555 | LegacyExtensions: file_test_proto_extDescs, |
| 556 | }.Build() |
| 557 | File_test_proto = out.File |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 558 | file_test_proto_rawDesc = nil |
| 559 | file_test_proto_goTypes = nil |
| 560 | file_test_proto_depIdxs = nil |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 561 | } |