message.pb.go 30 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: message.proto

package graphsync_message_pb

import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"

import io "io"

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package

type Message struct {
	// the actual data included in this message
26 27 28 29
	CompleteRequestList bool               `protobuf:"varint,1,opt,name=completeRequestList,proto3" json:"completeRequestList,omitempty"`
	Requests            []Message_Request  `protobuf:"bytes,2,rep,name=requests" json:"requests"`
	Responses           []Message_Response `protobuf:"bytes,3,rep,name=responses" json:"responses"`
	Data                []Message_Block    `protobuf:"bytes,4,rep,name=data" json:"data"`
30 31 32 33 34 35
}

func (m *Message) Reset()         { *m = Message{} }
func (m *Message) String() string { return proto.CompactTextString(m) }
func (*Message) ProtoMessage()    {}
func (*Message) Descriptor() ([]byte, []int) {
36
	return fileDescriptor_message_0f03446033f13d35, []int{0}
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
}
func (m *Message) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_Message.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalTo(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (dst *Message) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Message.Merge(dst, src)
}
func (m *Message) XXX_Size() int {
	return m.Size()
}
func (m *Message) XXX_DiscardUnknown() {
	xxx_messageInfo_Message.DiscardUnknown(m)
}

var xxx_messageInfo_Message proto.InternalMessageInfo

65
func (m *Message) GetCompleteRequestList() bool {
66
	if m != nil {
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
		return m.CompleteRequestList
	}
	return false
}

func (m *Message) GetRequests() []Message_Request {
	if m != nil {
		return m.Requests
	}
	return nil
}

func (m *Message) GetResponses() []Message_Response {
	if m != nil {
		return m.Responses
82 83 84 85
	}
	return nil
}

86
func (m *Message) GetData() []Message_Block {
87
	if m != nil {
88
		return m.Data
89 90 91 92 93 94
	}
	return nil
}

type Message_Request struct {
	Id       int32  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
95 96 97 98 99
	Root     []byte `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty"`
	Selector []byte `protobuf:"bytes,3,opt,name=selector,proto3" json:"selector,omitempty"`
	Extra    []byte `protobuf:"bytes,4,opt,name=extra,proto3" json:"extra,omitempty"`
	Priority int32  `protobuf:"varint,5,opt,name=priority,proto3" json:"priority,omitempty"`
	Cancel   bool   `protobuf:"varint,6,opt,name=cancel,proto3" json:"cancel,omitempty"`
100 101 102 103 104 105
}

func (m *Message_Request) Reset()         { *m = Message_Request{} }
func (m *Message_Request) String() string { return proto.CompactTextString(m) }
func (*Message_Request) ProtoMessage()    {}
func (*Message_Request) Descriptor() ([]byte, []int) {
106
	return fileDescriptor_message_0f03446033f13d35, []int{0, 0}
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
}
func (m *Message_Request) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *Message_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_Message_Request.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalTo(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (dst *Message_Request) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Message_Request.Merge(dst, src)
}
func (m *Message_Request) XXX_Size() int {
	return m.Size()
}
func (m *Message_Request) XXX_DiscardUnknown() {
	xxx_messageInfo_Message_Request.DiscardUnknown(m)
}

var xxx_messageInfo_Message_Request proto.InternalMessageInfo

func (m *Message_Request) GetId() int32 {
	if m != nil {
		return m.Id
	}
	return 0
}

142 143 144 145 146 147 148
func (m *Message_Request) GetRoot() []byte {
	if m != nil {
		return m.Root
	}
	return nil
}

149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
func (m *Message_Request) GetSelector() []byte {
	if m != nil {
		return m.Selector
	}
	return nil
}

func (m *Message_Request) GetExtra() []byte {
	if m != nil {
		return m.Extra
	}
	return nil
}

func (m *Message_Request) GetPriority() int32 {
	if m != nil {
		return m.Priority
	}
	return 0
}

func (m *Message_Request) GetCancel() bool {
	if m != nil {
		return m.Cancel
	}
	return false
}

type Message_Response struct {
	Id     int32  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Status int32  `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
180
	Extra  []byte `protobuf:"bytes,3,opt,name=extra,proto3" json:"extra,omitempty"`
181 182 183 184 185 186
}

func (m *Message_Response) Reset()         { *m = Message_Response{} }
func (m *Message_Response) String() string { return proto.CompactTextString(m) }
func (*Message_Response) ProtoMessage()    {}
func (*Message_Response) Descriptor() ([]byte, []int) {
187
	return fileDescriptor_message_0f03446033f13d35, []int{0, 1}
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229
}
func (m *Message_Response) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *Message_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_Message_Response.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalTo(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (dst *Message_Response) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Message_Response.Merge(dst, src)
}
func (m *Message_Response) XXX_Size() int {
	return m.Size()
}
func (m *Message_Response) XXX_DiscardUnknown() {
	xxx_messageInfo_Message_Response.DiscardUnknown(m)
}

var xxx_messageInfo_Message_Response proto.InternalMessageInfo

func (m *Message_Response) GetId() int32 {
	if m != nil {
		return m.Id
	}
	return 0
}

func (m *Message_Response) GetStatus() int32 {
	if m != nil {
		return m.Status
	}
	return 0
}

230
func (m *Message_Response) GetExtra() []byte {
231
	if m != nil {
232
		return m.Extra
233 234 235 236
	}
	return nil
}

237 238 239 240 241 242 243 244 245
type Message_Block struct {
	Prefix []byte `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"`
	Data   []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
}

func (m *Message_Block) Reset()         { *m = Message_Block{} }
func (m *Message_Block) String() string { return proto.CompactTextString(m) }
func (*Message_Block) ProtoMessage()    {}
func (*Message_Block) Descriptor() ([]byte, []int) {
246
	return fileDescriptor_message_0f03446033f13d35, []int{0, 2}
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
}
func (m *Message_Block) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *Message_Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_Message_Block.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalTo(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (dst *Message_Block) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Message_Block.Merge(dst, src)
}
func (m *Message_Block) XXX_Size() int {
	return m.Size()
}
func (m *Message_Block) XXX_DiscardUnknown() {
	xxx_messageInfo_Message_Block.DiscardUnknown(m)
}

var xxx_messageInfo_Message_Block proto.InternalMessageInfo

func (m *Message_Block) GetPrefix() []byte {
276
	if m != nil {
277 278 279 280 281 282 283 284
		return m.Prefix
	}
	return nil
}

func (m *Message_Block) GetData() []byte {
	if m != nil {
		return m.Data
285 286 287 288 289 290 291 292
	}
	return nil
}

func init() {
	proto.RegisterType((*Message)(nil), "graphsync.message.pb.Message")
	proto.RegisterType((*Message_Request)(nil), "graphsync.message.pb.Message.Request")
	proto.RegisterType((*Message_Response)(nil), "graphsync.message.pb.Message.Response")
293
	proto.RegisterType((*Message_Block)(nil), "graphsync.message.pb.Message.Block")
294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309
}
func (m *Message) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalTo(dAtA)
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *Message) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
310 311 312 313 314 315 316 317 318 319 320 321 322
	if m.CompleteRequestList {
		dAtA[i] = 0x8
		i++
		if m.CompleteRequestList {
			dAtA[i] = 1
		} else {
			dAtA[i] = 0
		}
		i++
	}
	if len(m.Requests) > 0 {
		for _, msg := range m.Requests {
			dAtA[i] = 0x12
323 324 325 326 327 328 329 330 331
			i++
			i = encodeVarintMessage(dAtA, i, uint64(msg.Size()))
			n, err := msg.MarshalTo(dAtA[i:])
			if err != nil {
				return 0, err
			}
			i += n
		}
	}
332 333 334 335 336 337 338 339 340 341 342 343 344 345 346
	if len(m.Responses) > 0 {
		for _, msg := range m.Responses {
			dAtA[i] = 0x1a
			i++
			i = encodeVarintMessage(dAtA, i, uint64(msg.Size()))
			n, err := msg.MarshalTo(dAtA[i:])
			if err != nil {
				return 0, err
			}
			i += n
		}
	}
	if len(m.Data) > 0 {
		for _, msg := range m.Data {
			dAtA[i] = 0x22
347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378
			i++
			i = encodeVarintMessage(dAtA, i, uint64(msg.Size()))
			n, err := msg.MarshalTo(dAtA[i:])
			if err != nil {
				return 0, err
			}
			i += n
		}
	}
	return i, nil
}

func (m *Message_Request) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalTo(dAtA)
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *Message_Request) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Id != 0 {
		dAtA[i] = 0x8
		i++
		i = encodeVarintMessage(dAtA, i, uint64(m.Id))
	}
379
	if len(m.Root) > 0 {
380
		dAtA[i] = 0x12
381
		i++
382 383 384 385 386 387
		i = encodeVarintMessage(dAtA, i, uint64(len(m.Root)))
		i += copy(dAtA[i:], m.Root)
	}
	if len(m.Selector) > 0 {
		dAtA[i] = 0x1a
		i++
388 389 390 391
		i = encodeVarintMessage(dAtA, i, uint64(len(m.Selector)))
		i += copy(dAtA[i:], m.Selector)
	}
	if len(m.Extra) > 0 {
392
		dAtA[i] = 0x22
393 394 395 396 397
		i++
		i = encodeVarintMessage(dAtA, i, uint64(len(m.Extra)))
		i += copy(dAtA[i:], m.Extra)
	}
	if m.Priority != 0 {
398
		dAtA[i] = 0x28
399 400 401 402
		i++
		i = encodeVarintMessage(dAtA, i, uint64(m.Priority))
	}
	if m.Cancel {
403
		dAtA[i] = 0x30
404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440
		i++
		if m.Cancel {
			dAtA[i] = 1
		} else {
			dAtA[i] = 0
		}
		i++
	}
	return i, nil
}

func (m *Message_Response) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalTo(dAtA)
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *Message_Response) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Id != 0 {
		dAtA[i] = 0x8
		i++
		i = encodeVarintMessage(dAtA, i, uint64(m.Id))
	}
	if m.Status != 0 {
		dAtA[i] = 0x10
		i++
		i = encodeVarintMessage(dAtA, i, uint64(m.Status))
	}
	if len(m.Extra) > 0 {
441
		dAtA[i] = 0x1a
442 443 444 445 446 447 448
		i++
		i = encodeVarintMessage(dAtA, i, uint64(len(m.Extra)))
		i += copy(dAtA[i:], m.Extra)
	}
	return i, nil
}

449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478
func (m *Message_Block) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalTo(dAtA)
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *Message_Block) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if len(m.Prefix) > 0 {
		dAtA[i] = 0xa
		i++
		i = encodeVarintMessage(dAtA, i, uint64(len(m.Prefix)))
		i += copy(dAtA[i:], m.Prefix)
	}
	if len(m.Data) > 0 {
		dAtA[i] = 0x12
		i++
		i = encodeVarintMessage(dAtA, i, uint64(len(m.Data)))
		i += copy(dAtA[i:], m.Data)
	}
	return i, nil
}

479 480 481 482 483 484 485 486 487 488 489 490 491 492 493
func encodeVarintMessage(dAtA []byte, offset int, v uint64) int {
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return offset + 1
}
func (m *Message) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
494 495 496 497 498
	if m.CompleteRequestList {
		n += 2
	}
	if len(m.Requests) > 0 {
		for _, e := range m.Requests {
499 500 501 502
			l = e.Size()
			n += 1 + l + sovMessage(uint64(l))
		}
	}
503 504 505 506 507 508 509 510
	if len(m.Responses) > 0 {
		for _, e := range m.Responses {
			l = e.Size()
			n += 1 + l + sovMessage(uint64(l))
		}
	}
	if len(m.Data) > 0 {
		for _, e := range m.Data {
511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526
			l = e.Size()
			n += 1 + l + sovMessage(uint64(l))
		}
	}
	return n
}

func (m *Message_Request) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Id != 0 {
		n += 1 + sovMessage(uint64(m.Id))
	}
527 528 529 530
	l = len(m.Root)
	if l > 0 {
		n += 1 + l + sovMessage(uint64(l))
	}
531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559
	l = len(m.Selector)
	if l > 0 {
		n += 1 + l + sovMessage(uint64(l))
	}
	l = len(m.Extra)
	if l > 0 {
		n += 1 + l + sovMessage(uint64(l))
	}
	if m.Priority != 0 {
		n += 1 + sovMessage(uint64(m.Priority))
	}
	if m.Cancel {
		n += 2
	}
	return n
}

func (m *Message_Response) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Id != 0 {
		n += 1 + sovMessage(uint64(m.Id))
	}
	if m.Status != 0 {
		n += 1 + sovMessage(uint64(m.Status))
	}
560
	l = len(m.Extra)
561 562 563
	if l > 0 {
		n += 1 + l + sovMessage(uint64(l))
	}
564 565 566 567 568 569 570 571 572 573 574 575 576 577
	return n
}

func (m *Message_Block) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Prefix)
	if l > 0 {
		n += 1 + l + sovMessage(uint64(l))
	}
	l = len(m.Data)
578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626
	if l > 0 {
		n += 1 + l + sovMessage(uint64(l))
	}
	return n
}

func sovMessage(x uint64) (n int) {
	for {
		n++
		x >>= 7
		if x == 0 {
			break
		}
	}
	return n
}
func sozMessage(x uint64) (n int) {
	return sovMessage(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Message) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowMessage
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: Message: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field CompleteRequestList", wireType)
			}
			var v int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowMessage
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				v |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.CompleteRequestList = bool(v != 0)
		case 2:
647
			if wireType != 2 {
648
				return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType)
649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowMessage
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthMessage
			}
			postIndex := iNdEx + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
672 673
			m.Requests = append(m.Requests, Message_Request{})
			if err := m.Requests[len(m.Requests)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
674 675 676
				return err
			}
			iNdEx = postIndex
677
		case 3:
678
			if wireType != 2 {
679
				return fmt.Errorf("proto: wrong wireType = %d for field Responses", wireType)
680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowMessage
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthMessage
			}
			postIndex := iNdEx + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735
			m.Responses = append(m.Responses, Message_Response{})
			if err := m.Responses[len(m.Responses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowMessage
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthMessage
			}
			postIndex := iNdEx + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Data = append(m.Data, Message_Block{})
			if err := m.Data[len(m.Data)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipMessage(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthMessage
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *Message_Request) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowMessage
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: Request: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
			}
			m.Id = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowMessage
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Id |= (int32(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Root", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowMessage
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthMessage
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Root = append(m.Root[:0], dAtA[iNdEx:postIndex]...)
			if m.Root == nil {
				m.Root = []byte{}
			}
			iNdEx = postIndex
		case 3:
840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowMessage
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthMessage
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Selector = append(m.Selector[:0], dAtA[iNdEx:postIndex]...)
			if m.Selector == nil {
				m.Selector = []byte{}
			}
			iNdEx = postIndex
870
		case 4:
871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Extra", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowMessage
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthMessage
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Extra = append(m.Extra[:0], dAtA[iNdEx:postIndex]...)
			if m.Extra == nil {
				m.Extra = []byte{}
			}
			iNdEx = postIndex
901
		case 5:
902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType)
			}
			m.Priority = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowMessage
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Priority |= (int32(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
920
		case 6:
921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Cancel", wireType)
			}
			var v int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowMessage
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				v |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.Cancel = bool(v != 0)
		default:
			iNdEx = preIndex
			skippy, err := skipMessage(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthMessage
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *Message_Response) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowMessage
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: Response: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
			}
			m.Id = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowMessage
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Id |= (int32(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
			}
			m.Status = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowMessage
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Status |= (int32(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 3:
			if wireType != 2 {
1030
				return fmt.Errorf("proto: wrong wireType = %d for field Extra", wireType)
1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowMessage
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthMessage
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
1054 1055 1056
			m.Extra = append(m.Extra[:0], dAtA[iNdEx:postIndex]...)
			if m.Extra == nil {
				m.Extra = []byte{}
1057 1058
			}
			iNdEx = postIndex
1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109
		default:
			iNdEx = preIndex
			skippy, err := skipMessage(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthMessage
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *Message_Block) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowMessage
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: Block: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: Block: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
1110
			if wireType != 2 {
1111
				return fmt.Errorf("proto: wrong wireType = %d for field Prefix", wireType)
1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowMessage
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthMessage
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168
			m.Prefix = append(m.Prefix[:0], dAtA[iNdEx:postIndex]...)
			if m.Prefix == nil {
				m.Prefix = []byte{}
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowMessage
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthMessage
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
			if m.Data == nil {
				m.Data = []byte{}
1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipMessage(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthMessage
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipMessage(dAtA []byte) (n int, err error) {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return 0, ErrIntOverflowMessage
			}
			if iNdEx >= l {
				return 0, io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		wireType := int(wire & 0x7)
		switch wireType {
		case 0:
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowMessage
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				iNdEx++
				if dAtA[iNdEx-1] < 0x80 {
					break
				}
			}
			return iNdEx, nil
		case 1:
			iNdEx += 8
			return iNdEx, nil
		case 2:
			var length int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowMessage
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				length |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			iNdEx += length
			if length < 0 {
				return 0, ErrInvalidLengthMessage
			}
			return iNdEx, nil
		case 3:
			for {
				var innerWire uint64
				var start int = iNdEx
				for shift := uint(0); ; shift += 7 {
					if shift >= 64 {
						return 0, ErrIntOverflowMessage
					}
					if iNdEx >= l {
						return 0, io.ErrUnexpectedEOF
					}
					b := dAtA[iNdEx]
					iNdEx++
					innerWire |= (uint64(b) & 0x7F) << shift
					if b < 0x80 {
						break
					}
				}
				innerWireType := int(innerWire & 0x7)
				if innerWireType == 4 {
					break
				}
				next, err := skipMessage(dAtA[start:])
				if err != nil {
					return 0, err
				}
				iNdEx = start + next
			}
			return iNdEx, nil
		case 4:
			return iNdEx, nil
		case 5:
			iNdEx += 4
			return iNdEx, nil
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
	}
	panic("unreachable")
}

var (
	ErrInvalidLengthMessage = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMessage   = fmt.Errorf("proto: integer overflow")
)

1297
func init() { proto.RegisterFile("message.proto", fileDescriptor_message_0f03446033f13d35) }
1298

1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324
var fileDescriptor_message_0f03446033f13d35 = []byte{
	// 380 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xcf, 0x4e, 0xf2, 0x40,
	0x14, 0xc5, 0xfb, 0x9f, 0x7e, 0xf3, 0xa1, 0x8b, 0x91, 0x90, 0x49, 0x17, 0x95, 0x68, 0x34, 0x6c,
	0x2c, 0x46, 0xd6, 0x6e, 0xd8, 0x68, 0x8c, 0x6e, 0xfa, 0x06, 0x6d, 0x19, 0x4a, 0x63, 0x61, 0xea,
	0xcc, 0x34, 0x81, 0xb7, 0x30, 0xf1, 0x15, 0x7c, 0x18, 0x96, 0x2c, 0x5d, 0x19, 0x03, 0x2f, 0x62,
	0x7a, 0x3b, 0x16, 0x13, 0x89, 0xee, 0xee, 0xe9, 0x9d, 0xf3, 0xbb, 0xe7, 0xde, 0x14, 0x1d, 0xcc,
	0xa8, 0x10, 0x51, 0x4a, 0x83, 0x82, 0x33, 0xc9, 0x70, 0x27, 0xe5, 0x51, 0x31, 0x15, 0xcb, 0x79,
	0x12, 0x34, 0x8d, 0xd8, 0xbb, 0x48, 0x33, 0x39, 0x2d, 0xe3, 0x20, 0x61, 0xb3, 0x41, 0xca, 0x52,
	0x36, 0x80, 0xc7, 0x71, 0x39, 0x01, 0x05, 0x02, 0xaa, 0x1a, 0x72, 0xf2, 0x6a, 0xa1, 0xd6, 0x43,
	0xed, 0xc6, 0x97, 0xe8, 0x28, 0x61, 0xb3, 0x22, 0xa7, 0x92, 0x86, 0xf4, 0xa9, 0xa4, 0x42, 0xde,
	0x67, 0x42, 0x12, 0xbd, 0xa7, 0xf7, 0xdd, 0x70, 0x5f, 0x0b, 0xdf, 0x20, 0x97, 0xd7, 0x52, 0x10,
	0xa3, 0x67, 0xf6, 0xff, 0x5f, 0x9d, 0x05, 0xfb, 0x52, 0x05, 0x6a, 0x44, 0xa0, 0xcc, 0x23, 0x6b,
	0xf5, 0x7e, 0xac, 0x85, 0x8d, 0x19, 0xdf, 0xa1, 0x7f, 0x9c, 0x8a, 0x82, 0xcd, 0x05, 0x15, 0xc4,
	0x04, 0xd2, 0xf9, 0x5f, 0xa4, 0xfa, 0xb9, 0x42, 0xed, 0xec, 0xf8, 0x1a, 0x59, 0xe3, 0x48, 0x46,
	0xc4, 0x02, 0xcc, 0xe9, 0xef, 0x98, 0x51, 0xce, 0x92, 0x47, 0xc5, 0x00, 0x9b, 0xf7, 0xa2, 0xa3,
	0x96, 0x8a, 0x89, 0x0f, 0x91, 0x91, 0x8d, 0xe1, 0x00, 0x76, 0x68, 0x64, 0x63, 0x8c, 0x91, 0xc5,
	0x19, 0x93, 0xc4, 0xe8, 0xe9, 0xfd, 0x76, 0x08, 0x35, 0xf6, 0x90, 0x2b, 0x68, 0x4e, 0x13, 0xc9,
	0x38, 0x31, 0xe1, 0x7b, 0xa3, 0x71, 0x07, 0xd9, 0x74, 0x21, 0x79, 0x95, 0xa5, 0x6a, 0xd4, 0xa2,
	0x72, 0x14, 0x3c, 0x63, 0x3c, 0x93, 0x4b, 0x62, 0x03, 0xbb, 0xd1, 0xb8, 0x8b, 0x9c, 0x24, 0x9a,
	0x27, 0x34, 0x27, 0x0e, 0x9c, 0x5d, 0x29, 0xef, 0x16, 0xb9, 0x5f, 0x1b, 0xff, 0x48, 0xd5, 0x45,
	0x8e, 0x90, 0x91, 0x2c, 0x05, 0xe4, 0xb2, 0x43, 0xa5, 0x76, 0xd3, 0xcd, 0x6f, 0xd3, 0xbd, 0x21,
	0xb2, 0x61, 0xe9, 0xca, 0x56, 0x70, 0x3a, 0xc9, 0x16, 0x80, 0x6a, 0x87, 0x4a, 0x55, 0x4b, 0xc2,
	0xfd, 0xd4, 0x92, 0x55, 0x3d, 0x22, 0xab, 0x8d, 0xaf, 0xaf, 0x37, 0xbe, 0xfe, 0xb1, 0xf1, 0xf5,
	0xe7, 0xad, 0xaf, 0xad, 0xb7, 0xbe, 0xf6, 0xb6, 0xf5, 0xb5, 0xd8, 0x81, 0xff, 0x68, 0xf8, 0x19,
	0x00, 0x00, 0xff, 0xff, 0xde, 0x2e, 0x80, 0x5d, 0x9d, 0x02, 0x00, 0x00,
1325
}