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 | 5e71dc9 | 2019-04-16 13:22:20 -0700 | [diff] [blame] | 163 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 164 | XXX_InternalExtensions protoimpl.ExtensionFields `json:"-"` |
| 165 | XXX_unrecognized protoimpl.UnknownFields `json:"-"` |
| 166 | XXX_sizecache protoimpl.SizeCache `json:"-"` |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 167 | } |
| 168 | |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 169 | func (x *Message1) Reset() { |
| 170 | *x = Message1{} |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 171 | } |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 172 | |
| 173 | func (x *Message1) String() string { |
| 174 | return protoimpl.X.MessageStringOf(x) |
| 175 | } |
| 176 | |
| 177 | func (*Message1) ProtoMessage() {} |
| 178 | |
| 179 | func (x *Message1) ProtoReflect() protoreflect.Message { |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 180 | return file_test_proto_msgTypes[0].MessageOf(x) |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 181 | } |
Joe Tsai | 8e506a8 | 2019-03-16 00:05:34 -0700 | [diff] [blame] | 182 | |
Damien Neil | 0d3e8cc | 2019-04-01 13:31:55 -0700 | [diff] [blame] | 183 | func (m *Message1) XXX_Methods() *protoiface.Methods { |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 184 | return file_test_proto_msgTypes[0].Methods() |
Damien Neil | 0d3e8cc | 2019-04-01 13:31:55 -0700 | [diff] [blame] | 185 | } |
| 186 | |
Joe Tsai | 8e506a8 | 2019-03-16 00:05:34 -0700 | [diff] [blame] | 187 | // Deprecated: Use Message1.ProtoReflect.Type instead. |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 188 | func (*Message1) Descriptor() ([]byte, []int) { |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 189 | return file_test_proto_rawDescGZIP(), []int{0} |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 190 | } |
| 191 | |
Joe Tsai | 4fddeba | 2019-03-20 18:29:32 -0700 | [diff] [blame] | 192 | var extRange_Message1 = []protoiface.ExtensionRangeV1{ |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 193 | {Start: 10, End: 536870911}, |
| 194 | } |
| 195 | |
Joe Tsai | 8e506a8 | 2019-03-16 00:05:34 -0700 | [diff] [blame] | 196 | // Deprecated: Use Message1.ProtoReflect.Type.ExtensionRanges instead. |
Joe Tsai | 4fddeba | 2019-03-20 18:29:32 -0700 | [diff] [blame] | 197 | func (*Message1) ExtensionRangeArray() []protoiface.ExtensionRangeV1 { |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 198 | return extRange_Message1 |
| 199 | } |
| 200 | |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 201 | type Message2 struct { |
Joe Tsai | 5e71dc9 | 2019-04-16 13:22:20 -0700 | [diff] [blame] | 202 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 203 | XXX_unrecognized protoimpl.UnknownFields `json:"-"` |
| 204 | XXX_sizecache protoimpl.SizeCache `json:"-"` |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 205 | } |
| 206 | |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 207 | func (x *Message2) Reset() { |
| 208 | *x = Message2{} |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 209 | } |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 210 | |
| 211 | func (x *Message2) String() string { |
| 212 | return protoimpl.X.MessageStringOf(x) |
| 213 | } |
| 214 | |
| 215 | func (*Message2) ProtoMessage() {} |
| 216 | |
| 217 | func (x *Message2) ProtoReflect() protoreflect.Message { |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 218 | return file_test_proto_msgTypes[1].MessageOf(x) |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 219 | } |
Joe Tsai | 8e506a8 | 2019-03-16 00:05:34 -0700 | [diff] [blame] | 220 | |
Damien Neil | 0d3e8cc | 2019-04-01 13:31:55 -0700 | [diff] [blame] | 221 | func (m *Message2) XXX_Methods() *protoiface.Methods { |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 222 | return file_test_proto_msgTypes[1].Methods() |
Damien Neil | 0d3e8cc | 2019-04-01 13:31:55 -0700 | [diff] [blame] | 223 | } |
| 224 | |
Joe Tsai | 8e506a8 | 2019-03-16 00:05:34 -0700 | [diff] [blame] | 225 | // Deprecated: Use Message2.ProtoReflect.Type instead. |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 226 | func (*Message2) Descriptor() ([]byte, []int) { |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 227 | return file_test_proto_rawDescGZIP(), []int{1} |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 228 | } |
| 229 | |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 230 | type Message3 struct { |
Joe Tsai | 5e71dc9 | 2019-04-16 13:22:20 -0700 | [diff] [blame] | 231 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 232 | XXX_unrecognized protoimpl.UnknownFields `json:"-"` |
| 233 | XXX_sizecache protoimpl.SizeCache `json:"-"` |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 234 | } |
| 235 | |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 236 | func (x *Message3) Reset() { |
| 237 | *x = Message3{} |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 238 | } |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 239 | |
| 240 | func (x *Message3) String() string { |
| 241 | return protoimpl.X.MessageStringOf(x) |
| 242 | } |
| 243 | |
| 244 | func (*Message3) ProtoMessage() {} |
| 245 | |
| 246 | func (x *Message3) ProtoReflect() protoreflect.Message { |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 247 | return file_test_proto_msgTypes[2].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 | |
Damien Neil | 0d3e8cc | 2019-04-01 13:31:55 -0700 | [diff] [blame] | 250 | func (m *Message3) XXX_Methods() *protoiface.Methods { |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 251 | return file_test_proto_msgTypes[2].Methods() |
Damien Neil | 0d3e8cc | 2019-04-01 13:31:55 -0700 | [diff] [blame] | 252 | } |
| 253 | |
Joe Tsai | 8e506a8 | 2019-03-16 00:05:34 -0700 | [diff] [blame] | 254 | // Deprecated: Use Message3.ProtoReflect.Type instead. |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 255 | func (*Message3) Descriptor() ([]byte, []int) { |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 256 | return file_test_proto_rawDescGZIP(), []int{2} |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 257 | } |
| 258 | |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 259 | type Message4 struct { |
Joe Tsai | 5e71dc9 | 2019-04-16 13:22:20 -0700 | [diff] [blame] | 260 | BoolField *bool `protobuf:"varint,30,opt,name=bool_field,json=boolField" json:"bool_field,omitempty"` |
| 261 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 262 | XXX_unrecognized protoimpl.UnknownFields `json:"-"` |
| 263 | XXX_sizecache protoimpl.SizeCache `json:"-"` |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 264 | } |
| 265 | |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 266 | func (x *Message4) Reset() { |
| 267 | *x = Message4{} |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 268 | } |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 269 | |
| 270 | func (x *Message4) String() string { |
| 271 | return protoimpl.X.MessageStringOf(x) |
| 272 | } |
| 273 | |
| 274 | func (*Message4) ProtoMessage() {} |
| 275 | |
| 276 | func (x *Message4) ProtoReflect() protoreflect.Message { |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 277 | return file_test_proto_msgTypes[3].MessageOf(x) |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 278 | } |
Joe Tsai | 8e506a8 | 2019-03-16 00:05:34 -0700 | [diff] [blame] | 279 | |
Damien Neil | 0d3e8cc | 2019-04-01 13:31:55 -0700 | [diff] [blame] | 280 | func (m *Message4) XXX_Methods() *protoiface.Methods { |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 281 | return file_test_proto_msgTypes[3].Methods() |
Damien Neil | 0d3e8cc | 2019-04-01 13:31:55 -0700 | [diff] [blame] | 282 | } |
| 283 | |
Joe Tsai | 8e506a8 | 2019-03-16 00:05:34 -0700 | [diff] [blame] | 284 | // Deprecated: Use Message4.ProtoReflect.Type instead. |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 285 | func (*Message4) Descriptor() ([]byte, []int) { |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 286 | return file_test_proto_rawDescGZIP(), []int{3} |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 287 | } |
| 288 | |
Joe Tsai | 61968ce | 2019-04-01 12:59:24 -0700 | [diff] [blame] | 289 | func (x *Message4) GetBoolField() bool { |
| 290 | if x != nil && x.BoolField != nil { |
| 291 | return *x.BoolField |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 292 | } |
| 293 | return false |
| 294 | } |
| 295 | |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 296 | var file_test_proto_extDescs = []protoiface.ExtensionDescV1{ |
Joe Tsai | afb455e | 2019-03-14 16:08:22 -0700 | [diff] [blame] | 297 | { |
| 298 | ExtendedType: (*Message1)(nil), |
| 299 | ExtensionType: (*string)(nil), |
| 300 | Field: 11, |
| 301 | Name: "testprotos.string_field", |
| 302 | Tag: "bytes,11,opt,name=string_field", |
| 303 | Filename: "test.proto", |
| 304 | }, |
| 305 | { |
| 306 | ExtendedType: (*Message1)(nil), |
| 307 | ExtensionType: (*Enum1)(nil), |
| 308 | Field: 12, |
| 309 | Name: "testprotos.enum_field", |
| 310 | Tag: "varint,12,opt,name=enum_field,enum=testprotos.Enum1", |
| 311 | Filename: "test.proto", |
| 312 | }, |
| 313 | { |
| 314 | ExtendedType: (*Message1)(nil), |
| 315 | ExtensionType: (*Message2)(nil), |
| 316 | Field: 13, |
| 317 | Name: "testprotos.message_field", |
| 318 | Tag: "bytes,13,opt,name=message_field", |
| 319 | Filename: "test.proto", |
| 320 | }, |
| 321 | { |
| 322 | ExtendedType: (*Message1)(nil), |
| 323 | ExtensionType: (*Message2)(nil), |
| 324 | Field: 21, |
| 325 | Name: "testprotos.Message4.message_field", |
| 326 | Tag: "bytes,21,opt,name=message_field", |
| 327 | Filename: "test.proto", |
| 328 | }, |
| 329 | { |
| 330 | ExtendedType: (*Message1)(nil), |
| 331 | ExtensionType: (*Enum1)(nil), |
| 332 | Field: 22, |
| 333 | Name: "testprotos.Message4.enum_field", |
| 334 | Tag: "varint,22,opt,name=enum_field,enum=testprotos.Enum1", |
| 335 | Filename: "test.proto", |
| 336 | }, |
| 337 | { |
| 338 | ExtendedType: (*Message1)(nil), |
| 339 | ExtensionType: (*string)(nil), |
| 340 | Field: 23, |
| 341 | Name: "testprotos.Message4.string_field", |
| 342 | Tag: "bytes,23,opt,name=string_field", |
| 343 | Filename: "test.proto", |
| 344 | }, |
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 | var ( |
| 347 | // extend testprotos.Message1 { optional string string_field = 11; } |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 348 | E_StringField = &file_test_proto_extDescs[0] |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 349 | |
Joe Tsai | afb455e | 2019-03-14 16:08:22 -0700 | [diff] [blame] | 350 | // extend testprotos.Message1 { optional testprotos.Enum1 enum_field = 12; } |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 351 | E_EnumField = &file_test_proto_extDescs[1] |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 352 | |
Joe Tsai | afb455e | 2019-03-14 16:08:22 -0700 | [diff] [blame] | 353 | // extend testprotos.Message1 { optional testprotos.Message2 message_field = 13; } |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 354 | E_MessageField = &file_test_proto_extDescs[2] |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 355 | |
Joe Tsai | afb455e | 2019-03-14 16:08:22 -0700 | [diff] [blame] | 356 | // extend testprotos.Message1 { optional testprotos.Message2 message_field = 21; } |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 357 | E_Message4_MessageField = &file_test_proto_extDescs[3] |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 358 | |
Joe Tsai | afb455e | 2019-03-14 16:08:22 -0700 | [diff] [blame] | 359 | // extend testprotos.Message1 { optional testprotos.Enum1 enum_field = 22; } |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 360 | E_Message4_EnumField = &file_test_proto_extDescs[4] |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 361 | |
Joe Tsai | afb455e | 2019-03-14 16:08:22 -0700 | [diff] [blame] | 362 | // extend testprotos.Message1 { optional string string_field = 23; } |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 363 | E_Message4_StringField = &file_test_proto_extDescs[5] |
Joe Tsai | afb455e | 2019-03-14 16:08:22 -0700 | [diff] [blame] | 364 | ) |
Joe Tsai | 5d72cc2 | 2019-03-28 01:13:26 -0700 | [diff] [blame] | 365 | var File_test_proto protoreflect.FileDescriptor |
| 366 | |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 367 | var file_test_proto_rawDesc = []byte{ |
Joe Tsai | 1905843 | 2019-02-27 21:46:29 -0800 | [diff] [blame] | 368 | 0x0a, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x74, 0x65, |
| 369 | 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0x14, 0x0a, 0x08, 0x4d, 0x65, 0x73, 0x73, |
| 370 | 0x61, 0x67, 0x65, 0x31, 0x2a, 0x08, 0x08, 0x0a, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x0a, |
| 371 | 0x0a, 0x08, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x22, 0x0a, 0x0a, 0x08, 0x4d, 0x65, |
| 372 | 0x73, 0x73, 0x61, 0x67, 0x65, 0x33, 0x22, 0xfb, 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x73, 0x73, 0x61, |
| 373 | 0x67, 0x65, 0x34, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, |
| 374 | 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x46, 0x69, 0x65, |
| 375 | 0x6c, 0x64, 0x32, 0x4f, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x66, 0x69, |
| 376 | 0x65, 0x6c, 0x64, 0x12, 0x14, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, |
| 377 | 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x31, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, |
| 378 | 0x14, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, 0x65, 0x73, |
| 379 | 0x73, 0x61, 0x67, 0x65, 0x32, 0x52, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x46, 0x69, |
| 380 | 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] | 381 | 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] | 382 | 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] | 383 | 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] | 384 | 0x52, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x32, 0x37, 0x0a, 0x0c, 0x73, |
| 385 | 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x14, 0x2e, 0x74, 0x65, |
| 386 | 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, |
| 387 | 0x31, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, |
| 388 | 0x69, 0x65, 0x6c, 0x64, 0x2a, 0x10, 0x0a, 0x05, 0x45, 0x6e, 0x75, 0x6d, 0x31, 0x12, 0x07, 0x0a, |
| 389 | 0x03, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x2a, 0x10, 0x0a, 0x05, 0x45, 0x6e, 0x75, 0x6d, 0x32, 0x12, |
| 390 | 0x07, 0x0a, 0x03, 0x55, 0x4e, 0x4f, 0x10, 0x01, 0x2a, 0x0f, 0x0a, 0x05, 0x45, 0x6e, 0x75, 0x6d, |
| 391 | 0x33, 0x12, 0x06, 0x0a, 0x02, 0x59, 0x49, 0x10, 0x01, 0x3a, 0x37, 0x0a, 0x0c, 0x73, 0x74, 0x72, |
| 392 | 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x14, 0x2e, 0x74, 0x65, 0x73, 0x74, |
| 393 | 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x31, 0x18, |
| 394 | 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x65, |
| 395 | 0x6c, 0x64, 0x3a, 0x46, 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, |
| 396 | 0x12, 0x14, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, 0x65, |
| 397 | 0x73, 0x73, 0x61, 0x67, 0x65, 0x31, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x74, |
| 398 | 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x31, 0x52, |
| 399 | 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x4f, 0x0a, 0x0d, 0x6d, 0x65, |
| 400 | 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x14, 0x2e, 0x74, 0x65, |
| 401 | 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, |
| 402 | 0x31, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, |
| 403 | 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] | 404 | 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x3d, 0x5a, 0x3b, 0x67, |
| 405 | 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, |
| 406 | 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, |
| 407 | 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, |
| 408 | 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 409 | } |
| 410 | |
Joe Tsai | 5d72cc2 | 2019-03-28 01:13:26 -0700 | [diff] [blame] | 411 | var ( |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 412 | file_test_proto_rawDescOnce sync.Once |
| 413 | file_test_proto_rawDescData = file_test_proto_rawDesc |
Joe Tsai | 5d72cc2 | 2019-03-28 01:13:26 -0700 | [diff] [blame] | 414 | ) |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 415 | |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 416 | func file_test_proto_rawDescGZIP() []byte { |
| 417 | file_test_proto_rawDescOnce.Do(func() { |
| 418 | file_test_proto_rawDescData = protoimpl.X.CompressGZIP(file_test_proto_rawDescData) |
Joe Tsai | 5d72cc2 | 2019-03-28 01:13:26 -0700 | [diff] [blame] | 419 | }) |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 420 | return file_test_proto_rawDescData |
Joe Tsai | 5d72cc2 | 2019-03-28 01:13:26 -0700 | [diff] [blame] | 421 | } |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 422 | |
Joe Tsai | d888139 | 2019-06-06 13:01:53 -0700 | [diff] [blame] | 423 | var file_test_proto_enumTypes = make([]prototype.Enum, 3) |
Joe Tsai | 4fe9663 | 2019-05-22 05:12:36 -0400 | [diff] [blame] | 424 | var file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 4) |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 425 | var file_test_proto_goTypes = []interface{}{ |
Damien Neil | 8012b44 | 2019-01-18 09:32:24 -0800 | [diff] [blame] | 426 | (Enum1)(0), // 0: testprotos.Enum1 |
| 427 | (Enum2)(0), // 1: testprotos.Enum2 |
| 428 | (Enum3)(0), // 2: testprotos.Enum3 |
| 429 | (*Message1)(nil), // 3: testprotos.Message1 |
| 430 | (*Message2)(nil), // 4: testprotos.Message2 |
| 431 | (*Message3)(nil), // 5: testprotos.Message3 |
| 432 | (*Message4)(nil), // 6: testprotos.Message4 |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 433 | } |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 434 | var file_test_proto_depIdxs = []int32{ |
Joe Tsai | d888139 | 2019-06-06 13:01:53 -0700 | [diff] [blame] | 435 | 3, // testprotos.string_field:extendee -> testprotos.Message1 |
| 436 | 3, // testprotos.enum_field:extendee -> testprotos.Message1 |
| 437 | 3, // testprotos.message_field:extendee -> testprotos.Message1 |
| 438 | 3, // testprotos.Message4.message_field:extendee -> testprotos.Message1 |
| 439 | 3, // testprotos.Message4.enum_field:extendee -> testprotos.Message1 |
| 440 | 3, // testprotos.Message4.string_field:extendee -> testprotos.Message1 |
| 441 | 0, // testprotos.enum_field:type_name -> testprotos.Enum1 |
| 442 | 4, // testprotos.message_field:type_name -> testprotos.Message2 |
| 443 | 4, // testprotos.Message4.message_field:type_name -> testprotos.Message2 |
| 444 | 0, // testprotos.Message4.enum_field:type_name -> testprotos.Enum1 |
| 445 | 10, // starting offset of method output_type sub-list |
| 446 | 10, // starting offset of method input_type sub-list |
| 447 | 6, // starting offset of extension type_name sub-list |
| 448 | 0, // starting offset of extension extendee sub-list |
| 449 | 0, // starting offset of field type_name sub-list |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 450 | } |
Damien Neil | 8012b44 | 2019-01-18 09:32:24 -0800 | [diff] [blame] | 451 | |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 452 | func init() { file_test_proto_init() } |
| 453 | func file_test_proto_init() { |
Damien Neil | 0fc2245 | 2019-03-08 17:18:11 -0800 | [diff] [blame] | 454 | if File_test_proto != nil { |
| 455 | return |
| 456 | } |
Joe Tsai | d888139 | 2019-06-06 13:01:53 -0700 | [diff] [blame] | 457 | out := protoimpl.TypeBuilder{ |
| 458 | File: protoimpl.DescBuilder{ |
| 459 | RawDescriptor: file_test_proto_rawDesc, |
| 460 | NumEnums: 3, |
| 461 | NumMessages: 4, |
| 462 | NumExtensions: 6, |
| 463 | NumServices: 0, |
| 464 | }, |
| 465 | GoTypes: file_test_proto_goTypes, |
| 466 | DependencyIndexes: file_test_proto_depIdxs, |
| 467 | MessageInfos: file_test_proto_msgTypes, |
| 468 | LegacyExtensions: file_test_proto_extDescs, |
| 469 | }.Build() |
| 470 | File_test_proto = out.File |
| 471 | file_test_proto_enumTypes = out.Enums |
Joe Tsai | 7ca7098 | 2019-04-15 13:57:56 -0700 | [diff] [blame] | 472 | file_test_proto_rawDesc = nil |
| 473 | file_test_proto_goTypes = nil |
| 474 | file_test_proto_depIdxs = nil |
Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame] | 475 | } |