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