message.pb.go 26.6 KB
Newer Older
Steven Allen's avatar
Steven Allen committed
1
// Code generated by protoc-gen-gogo. DO NOT EDIT.
2 3
// source: message.proto

4
package bitswap_message_pb
5

Jakub Sztandera's avatar
Jakub Sztandera committed
6 7 8 9 10 11
import (
	fmt "fmt"
	_ "github.com/gogo/protobuf/gogoproto"
	proto "github.com/gogo/protobuf/proto"
	io "io"
	math "math"
12
	math_bits "math/bits"
Jakub Sztandera's avatar
Jakub Sztandera committed
13
)
Steven Allen's avatar
Steven Allen committed
14

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

Steven Allen's avatar
Steven Allen committed
20 21 22 23
// 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.
24
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
Steven Allen's avatar
Steven Allen committed
25

26
type Message struct {
Jakub Sztandera's avatar
Jakub Sztandera committed
27 28 29
	Wantlist Message_Wantlist `protobuf:"bytes,1,opt,name=wantlist,proto3" json:"wantlist"`
	Blocks   [][]byte         `protobuf:"bytes,2,rep,name=blocks,proto3" json:"blocks,omitempty"`
	Payload  []Message_Block  `protobuf:"bytes,3,rep,name=payload,proto3" json:"payload"`
30 31
}

32 33 34
func (m *Message) Reset()         { *m = Message{} }
func (m *Message) String() string { return proto.CompactTextString(m) }
func (*Message) ProtoMessage()    {}
Steven Allen's avatar
Steven Allen committed
35
func (*Message) Descriptor() ([]byte, []int) {
Jakub Sztandera's avatar
Jakub Sztandera committed
36
	return fileDescriptor_33c57e4bae7b9afd, []int{0}
Steven Allen's avatar
Steven Allen committed
37 38 39 40 41 42 43 44 45
}
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)]
46
		n, err := m.MarshalToSizedBuffer(b)
Steven Allen's avatar
Steven Allen committed
47 48 49 50 51 52
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
Jakub Sztandera's avatar
Jakub Sztandera committed
53 54
func (m *Message) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Message.Merge(m, src)
Steven Allen's avatar
Steven Allen committed
55 56 57 58 59 60 61 62 63
}
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
64

Steven Allen's avatar
Steven Allen committed
65
func (m *Message) GetWantlist() Message_Wantlist {
66 67 68
	if m != nil {
		return m.Wantlist
	}
Steven Allen's avatar
Steven Allen committed
69
	return Message_Wantlist{}
70 71
}

72
func (m *Message) GetBlocks() [][]byte {
73 74 75 76 77 78
	if m != nil {
		return m.Blocks
	}
	return nil
}

Steven Allen's avatar
Steven Allen committed
79
func (m *Message) GetPayload() []Message_Block {
80 81 82 83 84 85
	if m != nil {
		return m.Payload
	}
	return nil
}

Jeromy's avatar
Jeromy committed
86
type Message_Wantlist struct {
Jakub Sztandera's avatar
Jakub Sztandera committed
87 88
	Entries []Message_Wantlist_Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries"`
	Full    bool                     `protobuf:"varint,2,opt,name=full,proto3" json:"full,omitempty"`
Jeromy's avatar
Jeromy committed
89 90 91 92 93
}

func (m *Message_Wantlist) Reset()         { *m = Message_Wantlist{} }
func (m *Message_Wantlist) String() string { return proto.CompactTextString(m) }
func (*Message_Wantlist) ProtoMessage()    {}
Steven Allen's avatar
Steven Allen committed
94
func (*Message_Wantlist) Descriptor() ([]byte, []int) {
Jakub Sztandera's avatar
Jakub Sztandera committed
95
	return fileDescriptor_33c57e4bae7b9afd, []int{0, 0}
Steven Allen's avatar
Steven Allen committed
96 97 98 99 100 101 102 103 104
}
func (m *Message_Wantlist) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *Message_Wantlist) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_Message_Wantlist.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
105
		n, err := m.MarshalToSizedBuffer(b)
Steven Allen's avatar
Steven Allen committed
106 107 108 109 110 111
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
Jakub Sztandera's avatar
Jakub Sztandera committed
112 113
func (m *Message_Wantlist) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Message_Wantlist.Merge(m, src)
Steven Allen's avatar
Steven Allen committed
114 115 116 117 118 119 120 121 122
}
func (m *Message_Wantlist) XXX_Size() int {
	return m.Size()
}
func (m *Message_Wantlist) XXX_DiscardUnknown() {
	xxx_messageInfo_Message_Wantlist.DiscardUnknown(m)
}

var xxx_messageInfo_Message_Wantlist proto.InternalMessageInfo
Jeromy's avatar
Jeromy committed
123

Steven Allen's avatar
Steven Allen committed
124
func (m *Message_Wantlist) GetEntries() []Message_Wantlist_Entry {
Jeromy's avatar
Jeromy committed
125 126 127 128 129 130 131
	if m != nil {
		return m.Entries
	}
	return nil
}

func (m *Message_Wantlist) GetFull() bool {
Steven Allen's avatar
Steven Allen committed
132 133
	if m != nil {
		return m.Full
Jeromy's avatar
Jeromy committed
134 135 136 137 138
	}
	return false
}

type Message_Wantlist_Entry struct {
Jakub Sztandera's avatar
Jakub Sztandera committed
139 140 141
	Block    []byte `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"`
	Priority int32  `protobuf:"varint,2,opt,name=priority,proto3" json:"priority,omitempty"`
	Cancel   bool   `protobuf:"varint,3,opt,name=cancel,proto3" json:"cancel,omitempty"`
Jeromy's avatar
Jeromy committed
142 143 144 145 146
}

func (m *Message_Wantlist_Entry) Reset()         { *m = Message_Wantlist_Entry{} }
func (m *Message_Wantlist_Entry) String() string { return proto.CompactTextString(m) }
func (*Message_Wantlist_Entry) ProtoMessage()    {}
Steven Allen's avatar
Steven Allen committed
147
func (*Message_Wantlist_Entry) Descriptor() ([]byte, []int) {
Jakub Sztandera's avatar
Jakub Sztandera committed
148
	return fileDescriptor_33c57e4bae7b9afd, []int{0, 0, 0}
Steven Allen's avatar
Steven Allen committed
149 150 151 152 153 154 155 156 157
}
func (m *Message_Wantlist_Entry) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *Message_Wantlist_Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_Message_Wantlist_Entry.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
158
		n, err := m.MarshalToSizedBuffer(b)
Steven Allen's avatar
Steven Allen committed
159 160 161 162 163 164
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
Jakub Sztandera's avatar
Jakub Sztandera committed
165 166
func (m *Message_Wantlist_Entry) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Message_Wantlist_Entry.Merge(m, src)
Steven Allen's avatar
Steven Allen committed
167 168 169 170 171 172 173
}
func (m *Message_Wantlist_Entry) XXX_Size() int {
	return m.Size()
}
func (m *Message_Wantlist_Entry) XXX_DiscardUnknown() {
	xxx_messageInfo_Message_Wantlist_Entry.DiscardUnknown(m)
}
Jeromy's avatar
Jeromy committed
174

Steven Allen's avatar
Steven Allen committed
175 176 177 178 179
var xxx_messageInfo_Message_Wantlist_Entry proto.InternalMessageInfo

func (m *Message_Wantlist_Entry) GetBlock() []byte {
	if m != nil {
		return m.Block
Jeromy's avatar
Jeromy committed
180
	}
Steven Allen's avatar
Steven Allen committed
181
	return nil
Jeromy's avatar
Jeromy committed
182 183 184
}

func (m *Message_Wantlist_Entry) GetPriority() int32 {
Steven Allen's avatar
Steven Allen committed
185 186
	if m != nil {
		return m.Priority
Jeromy's avatar
Jeromy committed
187 188 189 190 191
	}
	return 0
}

func (m *Message_Wantlist_Entry) GetCancel() bool {
Steven Allen's avatar
Steven Allen committed
192 193
	if m != nil {
		return m.Cancel
Jeromy's avatar
Jeromy committed
194 195 196 197
	}
	return false
}

198
type Message_Block struct {
Jakub Sztandera's avatar
Jakub Sztandera committed
199 200
	Prefix []byte `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"`
	Data   []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
201 202 203 204 205
}

func (m *Message_Block) Reset()         { *m = Message_Block{} }
func (m *Message_Block) String() string { return proto.CompactTextString(m) }
func (*Message_Block) ProtoMessage()    {}
Steven Allen's avatar
Steven Allen committed
206
func (*Message_Block) Descriptor() ([]byte, []int) {
Jakub Sztandera's avatar
Jakub Sztandera committed
207
	return fileDescriptor_33c57e4bae7b9afd, []int{0, 1}
Steven Allen's avatar
Steven Allen committed
208 209 210 211 212 213 214 215 216
}
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)]
217
		n, err := m.MarshalToSizedBuffer(b)
Steven Allen's avatar
Steven Allen committed
218 219 220 221 222 223
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
Jakub Sztandera's avatar
Jakub Sztandera committed
224 225
func (m *Message_Block) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Message_Block.Merge(m, src)
Steven Allen's avatar
Steven Allen committed
226 227 228 229 230 231 232 233 234
}
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
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249

func (m *Message_Block) GetPrefix() []byte {
	if m != nil {
		return m.Prefix
	}
	return nil
}

func (m *Message_Block) GetData() []byte {
	if m != nil {
		return m.Data
	}
	return nil
}

250
func init() {
251 252 253 254
	proto.RegisterType((*Message)(nil), "bitswap.message.pb.Message")
	proto.RegisterType((*Message_Wantlist)(nil), "bitswap.message.pb.Message.Wantlist")
	proto.RegisterType((*Message_Wantlist_Entry)(nil), "bitswap.message.pb.Message.Wantlist.Entry")
	proto.RegisterType((*Message_Block)(nil), "bitswap.message.pb.Message.Block")
255
}
Jakub Sztandera's avatar
Jakub Sztandera committed
256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283

func init() { proto.RegisterFile("message.proto", fileDescriptor_33c57e4bae7b9afd) }

var fileDescriptor_33c57e4bae7b9afd = []byte{
	// 335 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xcf, 0x4a, 0xf3, 0x40,
	0x14, 0xc5, 0x33, 0x4d, 0xd3, 0x86, 0xdb, 0x7e, 0x9b, 0xe1, 0x43, 0x86, 0x2c, 0x62, 0x14, 0x17,
	0x41, 0x70, 0x0a, 0xed, 0x13, 0x58, 0xd0, 0x85, 0xe0, 0xc2, 0x6c, 0x5c, 0x4f, 0xd2, 0x34, 0x0e,
	0xa6, 0x99, 0x90, 0x4c, 0xa9, 0x7d, 0x0b, 0x5f, 0xc1, 0x07, 0x71, 0xdf, 0x65, 0x97, 0xae, 0x44,
	0xda, 0x17, 0x91, 0xdc, 0x4e, 0xb3, 0x11, 0xc4, 0xdd, 0x3d, 0xc3, 0x39, 0xbf, 0xfb, 0x67, 0xe0,
	0xdf, 0x22, 0xad, 0x6b, 0x91, 0xa5, 0xbc, 0xac, 0x94, 0x56, 0x94, 0xc6, 0x52, 0xd7, 0x2b, 0x51,
	0xf2, 0xf6, 0x39, 0xf6, 0xae, 0x32, 0xa9, 0x9f, 0x96, 0x31, 0x4f, 0xd4, 0x62, 0x94, 0xa9, 0x4c,
	0x8d, 0xd0, 0x1a, 0x2f, 0xe7, 0xa8, 0x50, 0x60, 0x75, 0x40, 0x9c, 0xbf, 0xd9, 0xd0, 0xbf, 0x3f,
	0xa4, 0xe9, 0x2d, 0xb8, 0x2b, 0x51, 0xe8, 0x5c, 0xd6, 0x9a, 0x91, 0x80, 0x84, 0x83, 0xf1, 0x05,
	0xff, 0xd9, 0x81, 0x1b, 0x3b, 0x7f, 0x34, 0xde, 0x69, 0x77, 0xf3, 0x79, 0x6a, 0x45, 0x6d, 0x96,
	0x9e, 0x40, 0x2f, 0xce, 0x55, 0xf2, 0x5c, 0xb3, 0x4e, 0x60, 0x87, 0xc3, 0xc8, 0x28, 0x7a, 0x0d,
	0xfd, 0x52, 0xac, 0x73, 0x25, 0x66, 0xcc, 0x0e, 0xec, 0x70, 0x30, 0x3e, 0xfb, 0x0d, 0x3f, 0x6d,
	0x42, 0x86, 0x7d, 0xcc, 0x79, 0xef, 0x04, 0xdc, 0x63, 0x5f, 0x7a, 0x07, 0xfd, 0xb4, 0xd0, 0x95,
	0x4c, 0x6b, 0x46, 0x90, 0x77, 0xf9, 0x97, 0x71, 0xf9, 0x4d, 0xa1, 0xab, 0xf5, 0x11, 0x6c, 0x00,
	0x94, 0x42, 0x77, 0xbe, 0xcc, 0x73, 0xd6, 0x09, 0x48, 0xe8, 0x46, 0x58, 0x7b, 0x0f, 0xe0, 0xa0,
	0x97, 0xfe, 0x07, 0x07, 0x57, 0xc0, 0xab, 0x0c, 0xa3, 0x83, 0xa0, 0x1e, 0xb8, 0x65, 0x25, 0x55,
	0x25, 0xf5, 0x1a, 0x63, 0x4e, 0xd4, 0xea, 0xe6, 0x04, 0x89, 0x28, 0x92, 0x34, 0x67, 0x36, 0x02,
	0x8d, 0xf2, 0x26, 0xe0, 0xe0, 0x5e, 0x8d, 0xa1, 0xac, 0xd2, 0xb9, 0x7c, 0x31, 0x4c, 0xa3, 0x9a,
	0x39, 0x66, 0x42, 0x0b, 0x04, 0x0e, 0x23, 0xac, 0xa7, 0x6c, 0xb3, 0xf3, 0xc9, 0x76, 0xe7, 0x93,
	0xaf, 0x9d, 0x4f, 0x5e, 0xf7, 0xbe, 0xb5, 0xdd, 0xfb, 0xd6, 0xc7, 0xde, 0xb7, 0xe2, 0x1e, 0x7e,
	0xe2, 0xe4, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x1d, 0x6e, 0x21, 0x18, 0x02, 0x00, 0x00,
}

Steven Allen's avatar
Steven Allen committed
284 285 286
func (m *Message) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
287
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
Steven Allen's avatar
Steven Allen committed
288 289 290 291 292 293 294
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *Message) MarshalTo(dAtA []byte) (int, error) {
295 296 297 298 299 300
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
Steven Allen's avatar
Steven Allen committed
301 302 303
	_ = i
	var l int
	_ = l
304 305 306 307 308 309 310 311 312 313 314 315 316
	if len(m.Payload) > 0 {
		for iNdEx := len(m.Payload) - 1; iNdEx >= 0; iNdEx-- {
			{
				size, err := m.Payload[iNdEx].MarshalToSizedBuffer(dAtA[:i])
				if err != nil {
					return 0, err
				}
				i -= size
				i = encodeVarintMessage(dAtA, i, uint64(size))
			}
			i--
			dAtA[i] = 0x1a
		}
Steven Allen's avatar
Steven Allen committed
317 318
	}
	if len(m.Blocks) > 0 {
319 320 321 322 323
		for iNdEx := len(m.Blocks) - 1; iNdEx >= 0; iNdEx-- {
			i -= len(m.Blocks[iNdEx])
			copy(dAtA[i:], m.Blocks[iNdEx])
			i = encodeVarintMessage(dAtA, i, uint64(len(m.Blocks[iNdEx])))
			i--
Steven Allen's avatar
Steven Allen committed
324 325 326
			dAtA[i] = 0x12
		}
	}
327 328 329 330
	{
		size, err := m.Wantlist.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
Steven Allen's avatar
Steven Allen committed
331
		}
332 333
		i -= size
		i = encodeVarintMessage(dAtA, i, uint64(size))
Steven Allen's avatar
Steven Allen committed
334
	}
335 336 337
	i--
	dAtA[i] = 0xa
	return len(dAtA) - i, nil
Steven Allen's avatar
Steven Allen committed
338 339 340 341 342
}

func (m *Message_Wantlist) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
343
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
Steven Allen's avatar
Steven Allen committed
344 345 346 347 348 349 350
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *Message_Wantlist) MarshalTo(dAtA []byte) (int, error) {
351 352 353 354 355 356
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *Message_Wantlist) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
Steven Allen's avatar
Steven Allen committed
357 358 359 360
	_ = i
	var l int
	_ = l
	if m.Full {
361
		i--
Steven Allen's avatar
Steven Allen committed
362 363 364 365 366
		if m.Full {
			dAtA[i] = 1
		} else {
			dAtA[i] = 0
		}
367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382
		i--
		dAtA[i] = 0x10
	}
	if len(m.Entries) > 0 {
		for iNdEx := len(m.Entries) - 1; iNdEx >= 0; iNdEx-- {
			{
				size, err := m.Entries[iNdEx].MarshalToSizedBuffer(dAtA[:i])
				if err != nil {
					return 0, err
				}
				i -= size
				i = encodeVarintMessage(dAtA, i, uint64(size))
			}
			i--
			dAtA[i] = 0xa
		}
Steven Allen's avatar
Steven Allen committed
383
	}
384
	return len(dAtA) - i, nil
Steven Allen's avatar
Steven Allen committed
385 386 387 388 389
}

func (m *Message_Wantlist_Entry) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
390
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
Steven Allen's avatar
Steven Allen committed
391 392 393 394 395 396 397
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *Message_Wantlist_Entry) MarshalTo(dAtA []byte) (int, error) {
398 399 400 401 402 403
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *Message_Wantlist_Entry) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
Steven Allen's avatar
Steven Allen committed
404 405 406 407
	_ = i
	var l int
	_ = l
	if m.Cancel {
408
		i--
Steven Allen's avatar
Steven Allen committed
409 410 411 412 413
		if m.Cancel {
			dAtA[i] = 1
		} else {
			dAtA[i] = 0
		}
414 415 416 417 418 419 420 421 422 423 424 425 426 427
		i--
		dAtA[i] = 0x18
	}
	if m.Priority != 0 {
		i = encodeVarintMessage(dAtA, i, uint64(m.Priority))
		i--
		dAtA[i] = 0x10
	}
	if len(m.Block) > 0 {
		i -= len(m.Block)
		copy(dAtA[i:], m.Block)
		i = encodeVarintMessage(dAtA, i, uint64(len(m.Block)))
		i--
		dAtA[i] = 0xa
Steven Allen's avatar
Steven Allen committed
428
	}
429
	return len(dAtA) - i, nil
Steven Allen's avatar
Steven Allen committed
430 431 432 433 434
}

func (m *Message_Block) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
435
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
Steven Allen's avatar
Steven Allen committed
436 437 438 439 440 441 442
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *Message_Block) MarshalTo(dAtA []byte) (int, error) {
443 444 445 446 447 448
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *Message_Block) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
Steven Allen's avatar
Steven Allen committed
449 450 451 452
	_ = i
	var l int
	_ = l
	if len(m.Data) > 0 {
453 454
		i -= len(m.Data)
		copy(dAtA[i:], m.Data)
Steven Allen's avatar
Steven Allen committed
455
		i = encodeVarintMessage(dAtA, i, uint64(len(m.Data)))
456 457 458 459 460 461 462 463 464
		i--
		dAtA[i] = 0x12
	}
	if len(m.Prefix) > 0 {
		i -= len(m.Prefix)
		copy(dAtA[i:], m.Prefix)
		i = encodeVarintMessage(dAtA, i, uint64(len(m.Prefix)))
		i--
		dAtA[i] = 0xa
Steven Allen's avatar
Steven Allen committed
465
	}
466
	return len(dAtA) - i, nil
Steven Allen's avatar
Steven Allen committed
467 468 469
}

func encodeVarintMessage(dAtA []byte, offset int, v uint64) int {
470 471
	offset -= sovMessage(v)
	base := offset
Steven Allen's avatar
Steven Allen committed
472 473 474 475 476 477
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
478
	return base
Steven Allen's avatar
Steven Allen committed
479 480
}
func (m *Message) Size() (n int) {
Jakub Sztandera's avatar
Jakub Sztandera committed
481 482 483
	if m == nil {
		return 0
	}
Steven Allen's avatar
Steven Allen committed
484 485
	var l int
	_ = l
Steven Allen's avatar
Steven Allen committed
486 487
	l = m.Wantlist.Size()
	n += 1 + l + sovMessage(uint64(l))
Steven Allen's avatar
Steven Allen committed
488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503
	if len(m.Blocks) > 0 {
		for _, b := range m.Blocks {
			l = len(b)
			n += 1 + l + sovMessage(uint64(l))
		}
	}
	if len(m.Payload) > 0 {
		for _, e := range m.Payload {
			l = e.Size()
			n += 1 + l + sovMessage(uint64(l))
		}
	}
	return n
}

func (m *Message_Wantlist) Size() (n int) {
Jakub Sztandera's avatar
Jakub Sztandera committed
504 505 506
	if m == nil {
		return 0
	}
Steven Allen's avatar
Steven Allen committed
507 508 509 510 511 512 513 514 515 516 517 518 519 520 521
	var l int
	_ = l
	if len(m.Entries) > 0 {
		for _, e := range m.Entries {
			l = e.Size()
			n += 1 + l + sovMessage(uint64(l))
		}
	}
	if m.Full {
		n += 2
	}
	return n
}

func (m *Message_Wantlist_Entry) Size() (n int) {
Jakub Sztandera's avatar
Jakub Sztandera committed
522 523 524
	if m == nil {
		return 0
	}
Steven Allen's avatar
Steven Allen committed
525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540
	var l int
	_ = l
	l = len(m.Block)
	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_Block) Size() (n int) {
Jakub Sztandera's avatar
Jakub Sztandera committed
541 542 543
	if m == nil {
		return 0
	}
Steven Allen's avatar
Steven Allen committed
544 545 546 547 548 549 550 551 552 553 554 555 556 557
	var l int
	_ = l
	l = len(m.Prefix)
	if l > 0 {
		n += 1 + l + sovMessage(uint64(l))
	}
	l = len(m.Data)
	if l > 0 {
		n += 1 + l + sovMessage(uint64(l))
	}
	return n
}

func sovMessage(x uint64) (n int) {
558
	return (math_bits.Len64(x|1) + 6) / 7
Steven Allen's avatar
Steven Allen committed
559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577
}
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++
Jakub Sztandera's avatar
Jakub Sztandera committed
578
			wire |= uint64(b&0x7F) << shift
Steven Allen's avatar
Steven Allen committed
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
			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:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Wantlist", 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++
Jakub Sztandera's avatar
Jakub Sztandera committed
606
				msglen |= int(b&0x7F) << shift
Steven Allen's avatar
Steven Allen committed
607 608 609 610 611 612 613 614
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthMessage
			}
			postIndex := iNdEx + msglen
Jakub Sztandera's avatar
Jakub Sztandera committed
615 616 617
			if postIndex < 0 {
				return ErrInvalidLengthMessage
			}
Steven Allen's avatar
Steven Allen committed
618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.Wantlist.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Blocks", 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++
Jakub Sztandera's avatar
Jakub Sztandera committed
639
				byteLen |= int(b&0x7F) << shift
Steven Allen's avatar
Steven Allen committed
640 641 642 643 644 645 646 647
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthMessage
			}
			postIndex := iNdEx + byteLen
Jakub Sztandera's avatar
Jakub Sztandera committed
648 649 650
			if postIndex < 0 {
				return ErrInvalidLengthMessage
			}
Steven Allen's avatar
Steven Allen committed
651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Blocks = append(m.Blocks, make([]byte, postIndex-iNdEx))
			copy(m.Blocks[len(m.Blocks)-1], dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Payload", 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++
Jakub Sztandera's avatar
Jakub Sztandera committed
671
				msglen |= int(b&0x7F) << shift
Steven Allen's avatar
Steven Allen committed
672 673 674 675 676 677 678 679
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthMessage
			}
			postIndex := iNdEx + msglen
Jakub Sztandera's avatar
Jakub Sztandera committed
680 681 682
			if postIndex < 0 {
				return ErrInvalidLengthMessage
			}
Steven Allen's avatar
Steven Allen committed
683 684 685
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
Steven Allen's avatar
Steven Allen committed
686
			m.Payload = append(m.Payload, Message_Block{})
Steven Allen's avatar
Steven Allen committed
687 688 689 690 691 692 693 694 695 696 697 698 699
			if err := m.Payload[len(m.Payload)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipMessage(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthMessage
			}
Jakub Sztandera's avatar
Jakub Sztandera committed
700 701 702
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthMessage
			}
Steven Allen's avatar
Steven Allen committed
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
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *Message_Wantlist) 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++
Jakub Sztandera's avatar
Jakub Sztandera committed
730
			wire |= uint64(b&0x7F) << shift
Steven Allen's avatar
Steven Allen committed
731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: Wantlist: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: Wantlist: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Entries", 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++
Jakub Sztandera's avatar
Jakub Sztandera committed
758
				msglen |= int(b&0x7F) << shift
Steven Allen's avatar
Steven Allen committed
759 760 761 762 763 764 765 766
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthMessage
			}
			postIndex := iNdEx + msglen
Jakub Sztandera's avatar
Jakub Sztandera committed
767 768 769
			if postIndex < 0 {
				return ErrInvalidLengthMessage
			}
Steven Allen's avatar
Steven Allen committed
770 771 772
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
Steven Allen's avatar
Steven Allen committed
773
			m.Entries = append(m.Entries, Message_Wantlist_Entry{})
Steven Allen's avatar
Steven Allen committed
774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791
			if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Full", 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++
Jakub Sztandera's avatar
Jakub Sztandera committed
792
				v |= int(b&0x7F) << shift
Steven Allen's avatar
Steven Allen committed
793 794 795 796 797 798 799 800 801 802 803 804 805 806
				if b < 0x80 {
					break
				}
			}
			m.Full = bool(v != 0)
		default:
			iNdEx = preIndex
			skippy, err := skipMessage(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthMessage
			}
Jakub Sztandera's avatar
Jakub Sztandera committed
807 808 809
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthMessage
			}
Steven Allen's avatar
Steven Allen committed
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
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *Message_Wantlist_Entry) 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++
Jakub Sztandera's avatar
Jakub Sztandera committed
837
			wire |= uint64(b&0x7F) << shift
Steven Allen's avatar
Steven Allen committed
838 839 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
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: Entry: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: Entry: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Block", 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++
Jakub Sztandera's avatar
Jakub Sztandera committed
865
				byteLen |= int(b&0x7F) << shift
Steven Allen's avatar
Steven Allen committed
866 867 868 869 870 871 872 873
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthMessage
			}
			postIndex := iNdEx + byteLen
Jakub Sztandera's avatar
Jakub Sztandera committed
874 875 876
			if postIndex < 0 {
				return ErrInvalidLengthMessage
			}
Steven Allen's avatar
Steven Allen committed
877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Block = append(m.Block[:0], dAtA[iNdEx:postIndex]...)
			if m.Block == nil {
				m.Block = []byte{}
			}
			iNdEx = postIndex
		case 2:
			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++
Jakub Sztandera's avatar
Jakub Sztandera committed
899
				m.Priority |= int32(b&0x7F) << shift
Steven Allen's avatar
Steven Allen committed
900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917
				if b < 0x80 {
					break
				}
			}
		case 3:
			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++
Jakub Sztandera's avatar
Jakub Sztandera committed
918
				v |= int(b&0x7F) << shift
Steven Allen's avatar
Steven Allen committed
919 920 921 922 923 924 925 926 927 928 929 930 931 932
				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
			}
Jakub Sztandera's avatar
Jakub Sztandera committed
933 934 935
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthMessage
			}
Steven Allen's avatar
Steven Allen committed
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
			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++
Jakub Sztandera's avatar
Jakub Sztandera committed
963
			wire |= uint64(b&0x7F) << shift
Steven Allen's avatar
Steven Allen committed
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
			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:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Prefix", 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++
Jakub Sztandera's avatar
Jakub Sztandera committed
991
				byteLen |= int(b&0x7F) << shift
Steven Allen's avatar
Steven Allen committed
992 993 994 995 996 997 998 999
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthMessage
			}
			postIndex := iNdEx + byteLen
Jakub Sztandera's avatar
Jakub Sztandera committed
1000 1001 1002
			if postIndex < 0 {
				return ErrInvalidLengthMessage
			}
Steven Allen's avatar
Steven Allen committed
1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			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++
Jakub Sztandera's avatar
Jakub Sztandera committed
1025
				byteLen |= int(b&0x7F) << shift
Steven Allen's avatar
Steven Allen committed
1026 1027 1028 1029 1030 1031 1032 1033
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthMessage
			}
			postIndex := iNdEx + byteLen
Jakub Sztandera's avatar
Jakub Sztandera committed
1034 1035 1036
			if postIndex < 0 {
				return ErrInvalidLengthMessage
			}
Steven Allen's avatar
Steven Allen committed
1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
			if m.Data == nil {
				m.Data = []byte{}
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipMessage(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthMessage
			}
Jakub Sztandera's avatar
Jakub Sztandera committed
1054 1055 1056
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthMessage
			}
Steven Allen's avatar
Steven Allen committed
1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071
			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
1072
	depth := 0
Steven Allen's avatar
Steven Allen committed
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 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124
	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
				}
			}
		case 1:
			iNdEx += 8
		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
				}
			}
			if length < 0 {
				return 0, ErrInvalidLengthMessage
			}
Jakub Sztandera's avatar
Jakub Sztandera committed
1125
			iNdEx += length
Steven Allen's avatar
Steven Allen committed
1126
		case 3:
1127
			depth++
Steven Allen's avatar
Steven Allen committed
1128
		case 4:
1129 1130 1131 1132
			if depth == 0 {
				return 0, ErrUnexpectedEndOfGroupMessage
			}
			depth--
Steven Allen's avatar
Steven Allen committed
1133 1134 1135 1136 1137
		case 5:
			iNdEx += 4
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
1138 1139 1140 1141 1142 1143
		if iNdEx < 0 {
			return 0, ErrInvalidLengthMessage
		}
		if depth == 0 {
			return iNdEx, nil
		}
Steven Allen's avatar
Steven Allen committed
1144
	}
1145
	return 0, io.ErrUnexpectedEOF
Steven Allen's avatar
Steven Allen committed
1146 1147 1148
}

var (
1149 1150 1151
	ErrInvalidLengthMessage        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMessage          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMessage = fmt.Errorf("proto: unexpected end of group")
Steven Allen's avatar
Steven Allen committed
1152
)