github.com/gogo/protobuf@v1.3.2/test/indeximport-issue72/indeximport.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: indeximport.proto 3 4 package indeximport 5 6 import ( 7 bytes "bytes" 8 fmt "fmt" 9 _ "github.com/gogo/protobuf/gogoproto" 10 proto "github.com/gogo/protobuf/proto" 11 index "github.com/gogo/protobuf/test/indeximport-issue72/index" 12 io "io" 13 math "math" 14 math_bits "math/bits" 15 ) 16 17 // Reference imports to suppress errors if they are not otherwise used. 18 var _ = proto.Marshal 19 var _ = fmt.Errorf 20 var _ = math.Inf 21 22 // This is a compile-time assertion to ensure that this generated file 23 // is compatible with the proto package it is being compiled against. 24 // A compilation error at this line likely means your copy of the 25 // proto package needs to be updated. 26 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 27 28 type IndexQueries struct { 29 Queries []*index.IndexQuery `protobuf:"bytes,1,rep,name=Queries" json:"Queries,omitempty"` 30 XXX_NoUnkeyedLiteral struct{} `json:"-"` 31 XXX_unrecognized []byte `json:"-"` 32 XXX_sizecache int32 `json:"-"` 33 } 34 35 func (m *IndexQueries) Reset() { *m = IndexQueries{} } 36 func (m *IndexQueries) String() string { return proto.CompactTextString(m) } 37 func (*IndexQueries) ProtoMessage() {} 38 func (*IndexQueries) Descriptor() ([]byte, []int) { 39 return fileDescriptor_86f07d240f84eb2d, []int{0} 40 } 41 func (m *IndexQueries) XXX_Unmarshal(b []byte) error { 42 return m.Unmarshal(b) 43 } 44 func (m *IndexQueries) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 45 if deterministic { 46 return xxx_messageInfo_IndexQueries.Marshal(b, m, deterministic) 47 } else { 48 b = b[:cap(b)] 49 n, err := m.MarshalToSizedBuffer(b) 50 if err != nil { 51 return nil, err 52 } 53 return b[:n], nil 54 } 55 } 56 func (m *IndexQueries) XXX_Merge(src proto.Message) { 57 xxx_messageInfo_IndexQueries.Merge(m, src) 58 } 59 func (m *IndexQueries) XXX_Size() int { 60 return m.Size() 61 } 62 func (m *IndexQueries) XXX_DiscardUnknown() { 63 xxx_messageInfo_IndexQueries.DiscardUnknown(m) 64 } 65 66 var xxx_messageInfo_IndexQueries proto.InternalMessageInfo 67 68 func (m *IndexQueries) GetQueries() []*index.IndexQuery { 69 if m != nil { 70 return m.Queries 71 } 72 return nil 73 } 74 75 func init() { 76 proto.RegisterType((*IndexQueries)(nil), "indeximport.IndexQueries") 77 } 78 79 func init() { proto.RegisterFile("indeximport.proto", fileDescriptor_86f07d240f84eb2d) } 80 81 var fileDescriptor_86f07d240f84eb2d = []byte{ 82 // 168 bytes of a gzipped FileDescriptorProto 83 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcc, 0xcc, 0x4b, 0x49, 84 0xad, 0xc8, 0xcc, 0x2d, 0xc8, 0x2f, 0x2a, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x46, 85 0x12, 0x92, 0x72, 0x4e, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 86 0x4f, 0xcf, 0xd7, 0x07, 0xab, 0x49, 0x2a, 0x4d, 0xd3, 0x2f, 0x49, 0x2d, 0x2e, 0xd1, 0x47, 0x52, 87 0xaa, 0x9b, 0x59, 0x5c, 0x5c, 0x9a, 0x6a, 0x6e, 0x04, 0x11, 0x83, 0x90, 0x10, 0x13, 0xa5, 0x74, 88 0x71, 0x1a, 0x02, 0xe2, 0x81, 0x39, 0x60, 0x16, 0x44, 0xb9, 0x92, 0x35, 0x17, 0x8f, 0x27, 0x48, 89 0x77, 0x60, 0x69, 0x6a, 0x51, 0x66, 0x6a, 0xb1, 0x90, 0x36, 0x17, 0x3b, 0x94, 0x29, 0xc1, 0xa8, 90 0xc0, 0xac, 0xc1, 0x6d, 0x24, 0xa8, 0x07, 0x31, 0x1d, 0xae, 0xaa, 0x32, 0x08, 0xa6, 0xc2, 0x49, 91 0xe2, 0xc7, 0x43, 0x39, 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x77, 0x3c, 0x92, 0x63, 0x3c, 0xf1, 0x48, 92 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 93 0xd4, 0x50, 0x15, 0x6f, 0xeb, 0x00, 0x00, 0x00, 94 } 95 96 func (this *IndexQueries) Equal(that interface{}) bool { 97 if that == nil { 98 return this == nil 99 } 100 101 that1, ok := that.(*IndexQueries) 102 if !ok { 103 that2, ok := that.(IndexQueries) 104 if ok { 105 that1 = &that2 106 } else { 107 return false 108 } 109 } 110 if that1 == nil { 111 return this == nil 112 } else if this == nil { 113 return false 114 } 115 if len(this.Queries) != len(that1.Queries) { 116 return false 117 } 118 for i := range this.Queries { 119 if !this.Queries[i].Equal(that1.Queries[i]) { 120 return false 121 } 122 } 123 if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { 124 return false 125 } 126 return true 127 } 128 func (m *IndexQueries) Marshal() (dAtA []byte, err error) { 129 size := m.Size() 130 dAtA = make([]byte, size) 131 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 132 if err != nil { 133 return nil, err 134 } 135 return dAtA[:n], nil 136 } 137 138 func (m *IndexQueries) MarshalTo(dAtA []byte) (int, error) { 139 size := m.Size() 140 return m.MarshalToSizedBuffer(dAtA[:size]) 141 } 142 143 func (m *IndexQueries) MarshalToSizedBuffer(dAtA []byte) (int, error) { 144 i := len(dAtA) 145 _ = i 146 var l int 147 _ = l 148 if m.XXX_unrecognized != nil { 149 i -= len(m.XXX_unrecognized) 150 copy(dAtA[i:], m.XXX_unrecognized) 151 } 152 if len(m.Queries) > 0 { 153 for iNdEx := len(m.Queries) - 1; iNdEx >= 0; iNdEx-- { 154 { 155 size, err := m.Queries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 156 if err != nil { 157 return 0, err 158 } 159 i -= size 160 i = encodeVarintIndeximport(dAtA, i, uint64(size)) 161 } 162 i-- 163 dAtA[i] = 0xa 164 } 165 } 166 return len(dAtA) - i, nil 167 } 168 169 func encodeVarintIndeximport(dAtA []byte, offset int, v uint64) int { 170 offset -= sovIndeximport(v) 171 base := offset 172 for v >= 1<<7 { 173 dAtA[offset] = uint8(v&0x7f | 0x80) 174 v >>= 7 175 offset++ 176 } 177 dAtA[offset] = uint8(v) 178 return base 179 } 180 func NewPopulatedIndexQueries(r randyIndeximport, easy bool) *IndexQueries { 181 this := &IndexQueries{} 182 if r.Intn(5) != 0 { 183 v1 := r.Intn(5) 184 this.Queries = make([]*index.IndexQuery, v1) 185 for i := 0; i < v1; i++ { 186 this.Queries[i] = index.NewPopulatedIndexQuery(r, easy) 187 } 188 } 189 if !easy && r.Intn(10) != 0 { 190 this.XXX_unrecognized = randUnrecognizedIndeximport(r, 2) 191 } 192 return this 193 } 194 195 type randyIndeximport interface { 196 Float32() float32 197 Float64() float64 198 Int63() int64 199 Int31() int32 200 Uint32() uint32 201 Intn(n int) int 202 } 203 204 func randUTF8RuneIndeximport(r randyIndeximport) rune { 205 ru := r.Intn(62) 206 if ru < 10 { 207 return rune(ru + 48) 208 } else if ru < 36 { 209 return rune(ru + 55) 210 } 211 return rune(ru + 61) 212 } 213 func randStringIndeximport(r randyIndeximport) string { 214 v2 := r.Intn(100) 215 tmps := make([]rune, v2) 216 for i := 0; i < v2; i++ { 217 tmps[i] = randUTF8RuneIndeximport(r) 218 } 219 return string(tmps) 220 } 221 func randUnrecognizedIndeximport(r randyIndeximport, maxFieldNumber int) (dAtA []byte) { 222 l := r.Intn(5) 223 for i := 0; i < l; i++ { 224 wire := r.Intn(4) 225 if wire == 3 { 226 wire = 5 227 } 228 fieldNumber := maxFieldNumber + r.Intn(100) 229 dAtA = randFieldIndeximport(dAtA, r, fieldNumber, wire) 230 } 231 return dAtA 232 } 233 func randFieldIndeximport(dAtA []byte, r randyIndeximport, fieldNumber int, wire int) []byte { 234 key := uint32(fieldNumber)<<3 | uint32(wire) 235 switch wire { 236 case 0: 237 dAtA = encodeVarintPopulateIndeximport(dAtA, uint64(key)) 238 v3 := r.Int63() 239 if r.Intn(2) == 0 { 240 v3 *= -1 241 } 242 dAtA = encodeVarintPopulateIndeximport(dAtA, uint64(v3)) 243 case 1: 244 dAtA = encodeVarintPopulateIndeximport(dAtA, uint64(key)) 245 dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) 246 case 2: 247 dAtA = encodeVarintPopulateIndeximport(dAtA, uint64(key)) 248 ll := r.Intn(100) 249 dAtA = encodeVarintPopulateIndeximport(dAtA, uint64(ll)) 250 for j := 0; j < ll; j++ { 251 dAtA = append(dAtA, byte(r.Intn(256))) 252 } 253 default: 254 dAtA = encodeVarintPopulateIndeximport(dAtA, uint64(key)) 255 dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) 256 } 257 return dAtA 258 } 259 func encodeVarintPopulateIndeximport(dAtA []byte, v uint64) []byte { 260 for v >= 1<<7 { 261 dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) 262 v >>= 7 263 } 264 dAtA = append(dAtA, uint8(v)) 265 return dAtA 266 } 267 func (m *IndexQueries) Size() (n int) { 268 if m == nil { 269 return 0 270 } 271 var l int 272 _ = l 273 if len(m.Queries) > 0 { 274 for _, e := range m.Queries { 275 l = e.Size() 276 n += 1 + l + sovIndeximport(uint64(l)) 277 } 278 } 279 if m.XXX_unrecognized != nil { 280 n += len(m.XXX_unrecognized) 281 } 282 return n 283 } 284 285 func sovIndeximport(x uint64) (n int) { 286 return (math_bits.Len64(x|1) + 6) / 7 287 } 288 func sozIndeximport(x uint64) (n int) { 289 return sovIndeximport(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 290 } 291 func (m *IndexQueries) Unmarshal(dAtA []byte) error { 292 l := len(dAtA) 293 iNdEx := 0 294 for iNdEx < l { 295 preIndex := iNdEx 296 var wire uint64 297 for shift := uint(0); ; shift += 7 { 298 if shift >= 64 { 299 return ErrIntOverflowIndeximport 300 } 301 if iNdEx >= l { 302 return io.ErrUnexpectedEOF 303 } 304 b := dAtA[iNdEx] 305 iNdEx++ 306 wire |= uint64(b&0x7F) << shift 307 if b < 0x80 { 308 break 309 } 310 } 311 fieldNum := int32(wire >> 3) 312 wireType := int(wire & 0x7) 313 if wireType == 4 { 314 return fmt.Errorf("proto: IndexQueries: wiretype end group for non-group") 315 } 316 if fieldNum <= 0 { 317 return fmt.Errorf("proto: IndexQueries: illegal tag %d (wire type %d)", fieldNum, wire) 318 } 319 switch fieldNum { 320 case 1: 321 if wireType != 2 { 322 return fmt.Errorf("proto: wrong wireType = %d for field Queries", wireType) 323 } 324 var msglen int 325 for shift := uint(0); ; shift += 7 { 326 if shift >= 64 { 327 return ErrIntOverflowIndeximport 328 } 329 if iNdEx >= l { 330 return io.ErrUnexpectedEOF 331 } 332 b := dAtA[iNdEx] 333 iNdEx++ 334 msglen |= int(b&0x7F) << shift 335 if b < 0x80 { 336 break 337 } 338 } 339 if msglen < 0 { 340 return ErrInvalidLengthIndeximport 341 } 342 postIndex := iNdEx + msglen 343 if postIndex < 0 { 344 return ErrInvalidLengthIndeximport 345 } 346 if postIndex > l { 347 return io.ErrUnexpectedEOF 348 } 349 m.Queries = append(m.Queries, &index.IndexQuery{}) 350 if err := m.Queries[len(m.Queries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 351 return err 352 } 353 iNdEx = postIndex 354 default: 355 iNdEx = preIndex 356 skippy, err := skipIndeximport(dAtA[iNdEx:]) 357 if err != nil { 358 return err 359 } 360 if (skippy < 0) || (iNdEx+skippy) < 0 { 361 return ErrInvalidLengthIndeximport 362 } 363 if (iNdEx + skippy) > l { 364 return io.ErrUnexpectedEOF 365 } 366 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 367 iNdEx += skippy 368 } 369 } 370 371 if iNdEx > l { 372 return io.ErrUnexpectedEOF 373 } 374 return nil 375 } 376 func skipIndeximport(dAtA []byte) (n int, err error) { 377 l := len(dAtA) 378 iNdEx := 0 379 depth := 0 380 for iNdEx < l { 381 var wire uint64 382 for shift := uint(0); ; shift += 7 { 383 if shift >= 64 { 384 return 0, ErrIntOverflowIndeximport 385 } 386 if iNdEx >= l { 387 return 0, io.ErrUnexpectedEOF 388 } 389 b := dAtA[iNdEx] 390 iNdEx++ 391 wire |= (uint64(b) & 0x7F) << shift 392 if b < 0x80 { 393 break 394 } 395 } 396 wireType := int(wire & 0x7) 397 switch wireType { 398 case 0: 399 for shift := uint(0); ; shift += 7 { 400 if shift >= 64 { 401 return 0, ErrIntOverflowIndeximport 402 } 403 if iNdEx >= l { 404 return 0, io.ErrUnexpectedEOF 405 } 406 iNdEx++ 407 if dAtA[iNdEx-1] < 0x80 { 408 break 409 } 410 } 411 case 1: 412 iNdEx += 8 413 case 2: 414 var length int 415 for shift := uint(0); ; shift += 7 { 416 if shift >= 64 { 417 return 0, ErrIntOverflowIndeximport 418 } 419 if iNdEx >= l { 420 return 0, io.ErrUnexpectedEOF 421 } 422 b := dAtA[iNdEx] 423 iNdEx++ 424 length |= (int(b) & 0x7F) << shift 425 if b < 0x80 { 426 break 427 } 428 } 429 if length < 0 { 430 return 0, ErrInvalidLengthIndeximport 431 } 432 iNdEx += length 433 case 3: 434 depth++ 435 case 4: 436 if depth == 0 { 437 return 0, ErrUnexpectedEndOfGroupIndeximport 438 } 439 depth-- 440 case 5: 441 iNdEx += 4 442 default: 443 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 444 } 445 if iNdEx < 0 { 446 return 0, ErrInvalidLengthIndeximport 447 } 448 if depth == 0 { 449 return iNdEx, nil 450 } 451 } 452 return 0, io.ErrUnexpectedEOF 453 } 454 455 var ( 456 ErrInvalidLengthIndeximport = fmt.Errorf("proto: negative length found during unmarshaling") 457 ErrIntOverflowIndeximport = fmt.Errorf("proto: integer overflow") 458 ErrUnexpectedEndOfGroupIndeximport = fmt.Errorf("proto: unexpected end of group") 459 )