// Code generated by protoc-gen-gogo.
// source: rpc.proto
// DO NOT EDIT!

/*
	Package models is a generated protocol buffer package.

	It is generated from these files:
		rpc.proto
		torus.proto

	It has these top-level messages:
		BlockRequest
		BlockResponse
		PutBlockRequest
		PutResponse
		RebalanceCheckRequest
		RebalanceCheckResponse
		INode
		BlockLayer
		Volume
		PeerInfo
		RebalanceInfo
		Ring
		BlockRef
		INodeRef
*/
package models

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

import bytes "bytes"

import (
	context "golang.org/x/net/context"
	grpc "google.golang.org/grpc"
)

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.
const _ = proto.GoGoProtoPackageIsVersion1

type BlockRequest struct {
	BlockRef *BlockRef `protobuf:"bytes,1,opt,name=block_ref" json:"block_ref,omitempty"`
}

func (m *BlockRequest) Reset()                    { *m = BlockRequest{} }
func (m *BlockRequest) String() string            { return proto.CompactTextString(m) }
func (*BlockRequest) ProtoMessage()               {}
func (*BlockRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{0} }

func (m *BlockRequest) GetBlockRef() *BlockRef {
	if m != nil {
		return m.BlockRef
	}
	return nil
}

type BlockResponse struct {
	Ok   bool   `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
}

func (m *BlockResponse) Reset()                    { *m = BlockResponse{} }
func (m *BlockResponse) String() string            { return proto.CompactTextString(m) }
func (*BlockResponse) ProtoMessage()               {}
func (*BlockResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{1} }

type PutBlockRequest struct {
	Refs   []*BlockRef `protobuf:"bytes,1,rep,name=refs" json:"refs,omitempty"`
	Blocks [][]byte    `protobuf:"bytes,2,rep,name=blocks" json:"blocks,omitempty"`
}

func (m *PutBlockRequest) Reset()                    { *m = PutBlockRequest{} }
func (m *PutBlockRequest) String() string            { return proto.CompactTextString(m) }
func (*PutBlockRequest) ProtoMessage()               {}
func (*PutBlockRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{2} }

func (m *PutBlockRequest) GetRefs() []*BlockRef {
	if m != nil {
		return m.Refs
	}
	return nil
}

type PutResponse struct {
	Ok  bool   `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	Err string `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"`
}

func (m *PutResponse) Reset()                    { *m = PutResponse{} }
func (m *PutResponse) String() string            { return proto.CompactTextString(m) }
func (*PutResponse) ProtoMessage()               {}
func (*PutResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{3} }

type RebalanceCheckRequest struct {
	BlockRefs []*BlockRef `protobuf:"bytes,1,rep,name=block_refs" json:"block_refs,omitempty"`
}

func (m *RebalanceCheckRequest) Reset()                    { *m = RebalanceCheckRequest{} }
func (m *RebalanceCheckRequest) String() string            { return proto.CompactTextString(m) }
func (*RebalanceCheckRequest) ProtoMessage()               {}
func (*RebalanceCheckRequest) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{4} }

func (m *RebalanceCheckRequest) GetBlockRefs() []*BlockRef {
	if m != nil {
		return m.BlockRefs
	}
	return nil
}

type RebalanceCheckResponse struct {
	Valid  []bool `protobuf:"varint,1,rep,name=valid" json:"valid,omitempty"`
	Status int32  `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
}

func (m *RebalanceCheckResponse) Reset()                    { *m = RebalanceCheckResponse{} }
func (m *RebalanceCheckResponse) String() string            { return proto.CompactTextString(m) }
func (*RebalanceCheckResponse) ProtoMessage()               {}
func (*RebalanceCheckResponse) Descriptor() ([]byte, []int) { return fileDescriptorRpc, []int{5} }

func init() {
	proto.RegisterType((*BlockRequest)(nil), "models.BlockRequest")
	proto.RegisterType((*BlockResponse)(nil), "models.BlockResponse")
	proto.RegisterType((*PutBlockRequest)(nil), "models.PutBlockRequest")
	proto.RegisterType((*PutResponse)(nil), "models.PutResponse")
	proto.RegisterType((*RebalanceCheckRequest)(nil), "models.RebalanceCheckRequest")
	proto.RegisterType((*RebalanceCheckResponse)(nil), "models.RebalanceCheckResponse")
}
func (this *BlockRequest) VerboseEqual(that interface{}) error {
	if that == nil {
		if this == nil {
			return nil
		}
		return fmt.Errorf("that == nil && this != nil")
	}

	that1, ok := that.(*BlockRequest)
	if !ok {
		that2, ok := that.(BlockRequest)
		if ok {
			that1 = &that2
		} else {
			return fmt.Errorf("that is not of type *BlockRequest")
		}
	}
	if that1 == nil {
		if this == nil {
			return nil
		}
		return fmt.Errorf("that is type *BlockRequest but is nil && this != nil")
	} else if this == nil {
		return fmt.Errorf("that is type *BlockRequest but is not nil && this == nil")
	}
	if !this.BlockRef.Equal(that1.BlockRef) {
		return fmt.Errorf("BlockRef this(%v) Not Equal that(%v)", this.BlockRef, that1.BlockRef)
	}
	return nil
}
func (this *BlockRequest) Equal(that interface{}) bool {
	if that == nil {
		if this == nil {
			return true
		}
		return false
	}

	that1, ok := that.(*BlockRequest)
	if !ok {
		that2, ok := that.(BlockRequest)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		if this == nil {
			return true
		}
		return false
	} else if this == nil {
		return false
	}
	if !this.BlockRef.Equal(that1.BlockRef) {
		return false
	}
	return true
}
func (this *BlockResponse) VerboseEqual(that interface{}) error {
	if that == nil {
		if this == nil {
			return nil
		}
		return fmt.Errorf("that == nil && this != nil")
	}

	that1, ok := that.(*BlockResponse)
	if !ok {
		that2, ok := that.(BlockResponse)
		if ok {
			that1 = &that2
		} else {
			return fmt.Errorf("that is not of type *BlockResponse")
		}
	}
	if that1 == nil {
		if this == nil {
			return nil
		}
		return fmt.Errorf("that is type *BlockResponse but is nil && this != nil")
	} else if this == nil {
		return fmt.Errorf("that is type *BlockResponse but is not nil && this == nil")
	}
	if this.Ok != that1.Ok {
		return fmt.Errorf("Ok this(%v) Not Equal that(%v)", this.Ok, that1.Ok)
	}
	if !bytes.Equal(this.Data, that1.Data) {
		return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data)
	}
	return nil
}
func (this *BlockResponse) Equal(that interface{}) bool {
	if that == nil {
		if this == nil {
			return true
		}
		return false
	}

	that1, ok := that.(*BlockResponse)
	if !ok {
		that2, ok := that.(BlockResponse)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		if this == nil {
			return true
		}
		return false
	} else if this == nil {
		return false
	}
	if this.Ok != that1.Ok {
		return false
	}
	if !bytes.Equal(this.Data, that1.Data) {
		return false
	}
	return true
}
func (this *PutBlockRequest) VerboseEqual(that interface{}) error {
	if that == nil {
		if this == nil {
			return nil
		}
		return fmt.Errorf("that == nil && this != nil")
	}

	that1, ok := that.(*PutBlockRequest)
	if !ok {
		that2, ok := that.(PutBlockRequest)
		if ok {
			that1 = &that2
		} else {
			return fmt.Errorf("that is not of type *PutBlockRequest")
		}
	}
	if that1 == nil {
		if this == nil {
			return nil
		}
		return fmt.Errorf("that is type *PutBlockRequest but is nil && this != nil")
	} else if this == nil {
		return fmt.Errorf("that is type *PutBlockRequest but is not nil && this == nil")
	}
	if len(this.Refs) != len(that1.Refs) {
		return fmt.Errorf("Refs this(%v) Not Equal that(%v)", len(this.Refs), len(that1.Refs))
	}
	for i := range this.Refs {
		if !this.Refs[i].Equal(that1.Refs[i]) {
			return fmt.Errorf("Refs this[%v](%v) Not Equal that[%v](%v)", i, this.Refs[i], i, that1.Refs[i])
		}
	}
	if len(this.Blocks) != len(that1.Blocks) {
		return fmt.Errorf("Blocks this(%v) Not Equal that(%v)", len(this.Blocks), len(that1.Blocks))
	}
	for i := range this.Blocks {
		if !bytes.Equal(this.Blocks[i], that1.Blocks[i]) {
			return fmt.Errorf("Blocks this[%v](%v) Not Equal that[%v](%v)", i, this.Blocks[i], i, that1.Blocks[i])
		}
	}
	return nil
}
func (this *PutBlockRequest) Equal(that interface{}) bool {
	if that == nil {
		if this == nil {
			return true
		}
		return false
	}

	that1, ok := that.(*PutBlockRequest)
	if !ok {
		that2, ok := that.(PutBlockRequest)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		if this == nil {
			return true
		}
		return false
	} else if this == nil {
		return false
	}
	if len(this.Refs) != len(that1.Refs) {
		return false
	}
	for i := range this.Refs {
		if !this.Refs[i].Equal(that1.Refs[i]) {
			return false
		}
	}
	if len(this.Blocks) != len(that1.Blocks) {
		return false
	}
	for i := range this.Blocks {
		if !bytes.Equal(this.Blocks[i], that1.Blocks[i]) {
			return false
		}
	}
	return true
}
func (this *PutResponse) VerboseEqual(that interface{}) error {
	if that == nil {
		if this == nil {
			return nil
		}
		return fmt.Errorf("that == nil && this != nil")
	}

	that1, ok := that.(*PutResponse)
	if !ok {
		that2, ok := that.(PutResponse)
		if ok {
			that1 = &that2
		} else {
			return fmt.Errorf("that is not of type *PutResponse")
		}
	}
	if that1 == nil {
		if this == nil {
			return nil
		}
		return fmt.Errorf("that is type *PutResponse but is nil && this != nil")
	} else if this == nil {
		return fmt.Errorf("that is type *PutResponse but is not nil && this == nil")
	}
	if this.Ok != that1.Ok {
		return fmt.Errorf("Ok this(%v) Not Equal that(%v)", this.Ok, that1.Ok)
	}
	if this.Err != that1.Err {
		return fmt.Errorf("Err this(%v) Not Equal that(%v)", this.Err, that1.Err)
	}
	return nil
}
func (this *PutResponse) Equal(that interface{}) bool {
	if that == nil {
		if this == nil {
			return true
		}
		return false
	}

	that1, ok := that.(*PutResponse)
	if !ok {
		that2, ok := that.(PutResponse)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		if this == nil {
			return true
		}
		return false
	} else if this == nil {
		return false
	}
	if this.Ok != that1.Ok {
		return false
	}
	if this.Err != that1.Err {
		return false
	}
	return true
}
func (this *RebalanceCheckRequest) VerboseEqual(that interface{}) error {
	if that == nil {
		if this == nil {
			return nil
		}
		return fmt.Errorf("that == nil && this != nil")
	}

	that1, ok := that.(*RebalanceCheckRequest)
	if !ok {
		that2, ok := that.(RebalanceCheckRequest)
		if ok {
			that1 = &that2
		} else {
			return fmt.Errorf("that is not of type *RebalanceCheckRequest")
		}
	}
	if that1 == nil {
		if this == nil {
			return nil
		}
		return fmt.Errorf("that is type *RebalanceCheckRequest but is nil && this != nil")
	} else if this == nil {
		return fmt.Errorf("that is type *RebalanceCheckRequest but is not nil && this == nil")
	}
	if len(this.BlockRefs) != len(that1.BlockRefs) {
		return fmt.Errorf("BlockRefs this(%v) Not Equal that(%v)", len(this.BlockRefs), len(that1.BlockRefs))
	}
	for i := range this.BlockRefs {
		if !this.BlockRefs[i].Equal(that1.BlockRefs[i]) {
			return fmt.Errorf("BlockRefs this[%v](%v) Not Equal that[%v](%v)", i, this.BlockRefs[i], i, that1.BlockRefs[i])
		}
	}
	return nil
}
func (this *RebalanceCheckRequest) Equal(that interface{}) bool {
	if that == nil {
		if this == nil {
			return true
		}
		return false
	}

	that1, ok := that.(*RebalanceCheckRequest)
	if !ok {
		that2, ok := that.(RebalanceCheckRequest)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		if this == nil {
			return true
		}
		return false
	} else if this == nil {
		return false
	}
	if len(this.BlockRefs) != len(that1.BlockRefs) {
		return false
	}
	for i := range this.BlockRefs {
		if !this.BlockRefs[i].Equal(that1.BlockRefs[i]) {
			return false
		}
	}
	return true
}
func (this *RebalanceCheckResponse) VerboseEqual(that interface{}) error {
	if that == nil {
		if this == nil {
			return nil
		}
		return fmt.Errorf("that == nil && this != nil")
	}

	that1, ok := that.(*RebalanceCheckResponse)
	if !ok {
		that2, ok := that.(RebalanceCheckResponse)
		if ok {
			that1 = &that2
		} else {
			return fmt.Errorf("that is not of type *RebalanceCheckResponse")
		}
	}
	if that1 == nil {
		if this == nil {
			return nil
		}
		return fmt.Errorf("that is type *RebalanceCheckResponse but is nil && this != nil")
	} else if this == nil {
		return fmt.Errorf("that is type *RebalanceCheckResponse but is not nil && this == nil")
	}
	if len(this.Valid) != len(that1.Valid) {
		return fmt.Errorf("Valid this(%v) Not Equal that(%v)", len(this.Valid), len(that1.Valid))
	}
	for i := range this.Valid {
		if this.Valid[i] != that1.Valid[i] {
			return fmt.Errorf("Valid this[%v](%v) Not Equal that[%v](%v)", i, this.Valid[i], i, that1.Valid[i])
		}
	}
	if this.Status != that1.Status {
		return fmt.Errorf("Status this(%v) Not Equal that(%v)", this.Status, that1.Status)
	}
	return nil
}
func (this *RebalanceCheckResponse) Equal(that interface{}) bool {
	if that == nil {
		if this == nil {
			return true
		}
		return false
	}

	that1, ok := that.(*RebalanceCheckResponse)
	if !ok {
		that2, ok := that.(RebalanceCheckResponse)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		if this == nil {
			return true
		}
		return false
	} else if this == nil {
		return false
	}
	if len(this.Valid) != len(that1.Valid) {
		return false
	}
	for i := range this.Valid {
		if this.Valid[i] != that1.Valid[i] {
			return false
		}
	}
	if this.Status != that1.Status {
		return false
	}
	return true
}

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion2

// Client API for TorusStorage service

type TorusStorageClient interface {
	Block(ctx context.Context, in *BlockRequest, opts ...grpc.CallOption) (*BlockResponse, error)
	PutBlock(ctx context.Context, in *PutBlockRequest, opts ...grpc.CallOption) (*PutResponse, error)
	RebalanceCheck(ctx context.Context, in *RebalanceCheckRequest, opts ...grpc.CallOption) (*RebalanceCheckResponse, error)
}

type torusStorageClient struct {
	cc *grpc.ClientConn
}

func NewTorusStorageClient(cc *grpc.ClientConn) TorusStorageClient {
	return &torusStorageClient{cc}
}

func (c *torusStorageClient) Block(ctx context.Context, in *BlockRequest, opts ...grpc.CallOption) (*BlockResponse, error) {
	out := new(BlockResponse)
	err := grpc.Invoke(ctx, "/models.TorusStorage/Block", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *torusStorageClient) PutBlock(ctx context.Context, in *PutBlockRequest, opts ...grpc.CallOption) (*PutResponse, error) {
	out := new(PutResponse)
	err := grpc.Invoke(ctx, "/models.TorusStorage/PutBlock", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *torusStorageClient) RebalanceCheck(ctx context.Context, in *RebalanceCheckRequest, opts ...grpc.CallOption) (*RebalanceCheckResponse, error) {
	out := new(RebalanceCheckResponse)
	err := grpc.Invoke(ctx, "/models.TorusStorage/RebalanceCheck", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// Server API for TorusStorage service

type TorusStorageServer interface {
	Block(context.Context, *BlockRequest) (*BlockResponse, error)
	PutBlock(context.Context, *PutBlockRequest) (*PutResponse, error)
	RebalanceCheck(context.Context, *RebalanceCheckRequest) (*RebalanceCheckResponse, error)
}

func RegisterTorusStorageServer(s *grpc.Server, srv TorusStorageServer) {
	s.RegisterService(&_TorusStorage_serviceDesc, srv)
}

func _TorusStorage_Block_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(BlockRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TorusStorageServer).Block(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/models.TorusStorage/Block",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TorusStorageServer).Block(ctx, req.(*BlockRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TorusStorage_PutBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PutBlockRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TorusStorageServer).PutBlock(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/models.TorusStorage/PutBlock",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TorusStorageServer).PutBlock(ctx, req.(*PutBlockRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TorusStorage_RebalanceCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RebalanceCheckRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TorusStorageServer).RebalanceCheck(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/models.TorusStorage/RebalanceCheck",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TorusStorageServer).RebalanceCheck(ctx, req.(*RebalanceCheckRequest))
	}
	return interceptor(ctx, in, info, handler)
}

var _TorusStorage_serviceDesc = grpc.ServiceDesc{
	ServiceName: "models.TorusStorage",
	HandlerType: (*TorusStorageServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Block",
			Handler:    _TorusStorage_Block_Handler,
		},
		{
			MethodName: "PutBlock",
			Handler:    _TorusStorage_PutBlock_Handler,
		},
		{
			MethodName: "RebalanceCheck",
			Handler:    _TorusStorage_RebalanceCheck_Handler,
		},
	},
	Streams: []grpc.StreamDesc{},
}

func (m *BlockRequest) 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 *BlockRequest) MarshalTo(data []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.BlockRef != nil {
		data[i] = 0xa
		i++
		i = encodeVarintRpc(data, i, uint64(m.BlockRef.Size()))
		n1, err := m.BlockRef.MarshalTo(data[i:])
		if err != nil {
			return 0, err
		}
		i += n1
	}
	return i, nil
}

func (m *BlockResponse) 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 *BlockResponse) MarshalTo(data []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Ok {
		data[i] = 0x8
		i++
		if m.Ok {
			data[i] = 1
		} else {
			data[i] = 0
		}
		i++
	}
	if len(m.Data) > 0 {
		data[i] = 0x12
		i++
		i = encodeVarintRpc(data, i, uint64(len(m.Data)))
		i += copy(data[i:], m.Data)
	}
	return i, nil
}

func (m *PutBlockRequest) 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 *PutBlockRequest) MarshalTo(data []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if len(m.Refs) > 0 {
		for _, msg := range m.Refs {
			data[i] = 0xa
			i++
			i = encodeVarintRpc(data, i, uint64(msg.Size()))
			n, err := msg.MarshalTo(data[i:])
			if err != nil {
				return 0, err
			}
			i += n
		}
	}
	if len(m.Blocks) > 0 {
		for _, b := range m.Blocks {
			data[i] = 0x12
			i++
			i = encodeVarintRpc(data, i, uint64(len(b)))
			i += copy(data[i:], b)
		}
	}
	return i, nil
}

func (m *PutResponse) 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 *PutResponse) MarshalTo(data []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Ok {
		data[i] = 0x8
		i++
		if m.Ok {
			data[i] = 1
		} else {
			data[i] = 0
		}
		i++
	}
	if len(m.Err) > 0 {
		data[i] = 0x12
		i++
		i = encodeVarintRpc(data, i, uint64(len(m.Err)))
		i += copy(data[i:], m.Err)
	}
	return i, nil
}

func (m *RebalanceCheckRequest) 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 *RebalanceCheckRequest) MarshalTo(data []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if len(m.BlockRefs) > 0 {
		for _, msg := range m.BlockRefs {
			data[i] = 0xa
			i++
			i = encodeVarintRpc(data, i, uint64(msg.Size()))
			n, err := msg.MarshalTo(data[i:])
			if err != nil {
				return 0, err
			}
			i += n
		}
	}
	return i, nil
}

func (m *RebalanceCheckResponse) 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 *RebalanceCheckResponse) MarshalTo(data []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if len(m.Valid) > 0 {
		for _, b := range m.Valid {
			data[i] = 0x8
			i++
			if b {
				data[i] = 1
			} else {
				data[i] = 0
			}
			i++
		}
	}
	if m.Status != 0 {
		data[i] = 0x10
		i++
		i = encodeVarintRpc(data, i, uint64(m.Status))
	}
	return i, nil
}

func encodeFixed64Rpc(data []byte, offset int, v uint64) int {
	data[offset] = uint8(v)
	data[offset+1] = uint8(v >> 8)
	data[offset+2] = uint8(v >> 16)
	data[offset+3] = uint8(v >> 24)
	data[offset+4] = uint8(v >> 32)
	data[offset+5] = uint8(v >> 40)
	data[offset+6] = uint8(v >> 48)
	data[offset+7] = uint8(v >> 56)
	return offset + 8
}
func encodeFixed32Rpc(data []byte, offset int, v uint32) int {
	data[offset] = uint8(v)
	data[offset+1] = uint8(v >> 8)
	data[offset+2] = uint8(v >> 16)
	data[offset+3] = uint8(v >> 24)
	return offset + 4
}
func encodeVarintRpc(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 NewPopulatedBlockRequest(r randyRpc, easy bool) *BlockRequest {
	this := &BlockRequest{}
	if r.Intn(10) != 0 {
		this.BlockRef = NewPopulatedBlockRef(r, easy)
	}
	if !easy && r.Intn(10) != 0 {
	}
	return this
}

func NewPopulatedBlockResponse(r randyRpc, easy bool) *BlockResponse {
	this := &BlockResponse{}
	this.Ok = bool(bool(r.Intn(2) == 0))
	v1 := r.Intn(100)
	this.Data = make([]byte, v1)
	for i := 0; i < v1; i++ {
		this.Data[i] = byte(r.Intn(256))
	}
	if !easy && r.Intn(10) != 0 {
	}
	return this
}

func NewPopulatedPutBlockRequest(r randyRpc, easy bool) *PutBlockRequest {
	this := &PutBlockRequest{}
	if r.Intn(10) != 0 {
		v2 := r.Intn(5)
		this.Refs = make([]*BlockRef, v2)
		for i := 0; i < v2; i++ {
			this.Refs[i] = NewPopulatedBlockRef(r, easy)
		}
	}
	v3 := r.Intn(10)
	this.Blocks = make([][]byte, v3)
	for i := 0; i < v3; i++ {
		v4 := r.Intn(100)
		this.Blocks[i] = make([]byte, v4)
		for j := 0; j < v4; j++ {
			this.Blocks[i][j] = byte(r.Intn(256))
		}
	}
	if !easy && r.Intn(10) != 0 {
	}
	return this
}

func NewPopulatedPutResponse(r randyRpc, easy bool) *PutResponse {
	this := &PutResponse{}
	this.Ok = bool(bool(r.Intn(2) == 0))
	this.Err = randStringRpc(r)
	if !easy && r.Intn(10) != 0 {
	}
	return this
}

func NewPopulatedRebalanceCheckRequest(r randyRpc, easy bool) *RebalanceCheckRequest {
	this := &RebalanceCheckRequest{}
	if r.Intn(10) != 0 {
		v5 := r.Intn(5)
		this.BlockRefs = make([]*BlockRef, v5)
		for i := 0; i < v5; i++ {
			this.BlockRefs[i] = NewPopulatedBlockRef(r, easy)
		}
	}
	if !easy && r.Intn(10) != 0 {
	}
	return this
}

func NewPopulatedRebalanceCheckResponse(r randyRpc, easy bool) *RebalanceCheckResponse {
	this := &RebalanceCheckResponse{}
	v6 := r.Intn(10)
	this.Valid = make([]bool, v6)
	for i := 0; i < v6; i++ {
		this.Valid[i] = bool(bool(r.Intn(2) == 0))
	}
	this.Status = int32(r.Int31())
	if r.Intn(2) == 0 {
		this.Status *= -1
	}
	if !easy && r.Intn(10) != 0 {
	}
	return this
}

type randyRpc interface {
	Float32() float32
	Float64() float64
	Int63() int64
	Int31() int32
	Uint32() uint32
	Intn(n int) int
}

func randUTF8RuneRpc(r randyRpc) rune {
	ru := r.Intn(62)
	if ru < 10 {
		return rune(ru + 48)
	} else if ru < 36 {
		return rune(ru + 55)
	}
	return rune(ru + 61)
}
func randStringRpc(r randyRpc) string {
	v7 := r.Intn(100)
	tmps := make([]rune, v7)
	for i := 0; i < v7; i++ {
		tmps[i] = randUTF8RuneRpc(r)
	}
	return string(tmps)
}
func randUnrecognizedRpc(r randyRpc, maxFieldNumber int) (data []byte) {
	l := r.Intn(5)
	for i := 0; i < l; i++ {
		wire := r.Intn(4)
		if wire == 3 {
			wire = 5
		}
		fieldNumber := maxFieldNumber + r.Intn(100)
		data = randFieldRpc(data, r, fieldNumber, wire)
	}
	return data
}
func randFieldRpc(data []byte, r randyRpc, fieldNumber int, wire int) []byte {
	key := uint32(fieldNumber)<<3 | uint32(wire)
	switch wire {
	case 0:
		data = encodeVarintPopulateRpc(data, uint64(key))
		v8 := r.Int63()
		if r.Intn(2) == 0 {
			v8 *= -1
		}
		data = encodeVarintPopulateRpc(data, uint64(v8))
	case 1:
		data = encodeVarintPopulateRpc(data, uint64(key))
		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)))
	case 2:
		data = encodeVarintPopulateRpc(data, uint64(key))
		ll := r.Intn(100)
		data = encodeVarintPopulateRpc(data, uint64(ll))
		for j := 0; j < ll; j++ {
			data = append(data, byte(r.Intn(256)))
		}
	default:
		data = encodeVarintPopulateRpc(data, uint64(key))
		data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
	}
	return data
}
func encodeVarintPopulateRpc(data []byte, v uint64) []byte {
	for v >= 1<<7 {
		data = append(data, uint8(uint64(v)&0x7f|0x80))
		v >>= 7
	}
	data = append(data, uint8(v))
	return data
}
func (m *BlockRequest) Size() (n int) {
	var l int
	_ = l
	if m.BlockRef != nil {
		l = m.BlockRef.Size()
		n += 1 + l + sovRpc(uint64(l))
	}
	return n
}

func (m *BlockResponse) Size() (n int) {
	var l int
	_ = l
	if m.Ok {
		n += 2
	}
	l = len(m.Data)
	if l > 0 {
		n += 1 + l + sovRpc(uint64(l))
	}
	return n
}

func (m *PutBlockRequest) Size() (n int) {
	var l int
	_ = l
	if len(m.Refs) > 0 {
		for _, e := range m.Refs {
			l = e.Size()
			n += 1 + l + sovRpc(uint64(l))
		}
	}
	if len(m.Blocks) > 0 {
		for _, b := range m.Blocks {
			l = len(b)
			n += 1 + l + sovRpc(uint64(l))
		}
	}
	return n
}

func (m *PutResponse) Size() (n int) {
	var l int
	_ = l
	if m.Ok {
		n += 2
	}
	l = len(m.Err)
	if l > 0 {
		n += 1 + l + sovRpc(uint64(l))
	}
	return n
}

func (m *RebalanceCheckRequest) Size() (n int) {
	var l int
	_ = l
	if len(m.BlockRefs) > 0 {
		for _, e := range m.BlockRefs {
			l = e.Size()
			n += 1 + l + sovRpc(uint64(l))
		}
	}
	return n
}

func (m *RebalanceCheckResponse) Size() (n int) {
	var l int
	_ = l
	if len(m.Valid) > 0 {
		n += 2 * len(m.Valid)
	}
	if m.Status != 0 {
		n += 1 + sovRpc(uint64(m.Status))
	}
	return n
}

func sovRpc(x uint64) (n int) {
	for {
		n++
		x >>= 7
		if x == 0 {
			break
		}
	}
	return n
}
func sozRpc(x uint64) (n int) {
	return sovRpc(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *BlockRequest) 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 ErrIntOverflowRpc
			}
			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: BlockRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: BlockRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field BlockRef", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRpc
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[iNdEx]
				iNdEx++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthRpc
			}
			postIndex := iNdEx + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.BlockRef == nil {
				m.BlockRef = &BlockRef{}
			}
			if err := m.BlockRef.Unmarshal(data[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipRpc(data[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthRpc
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *BlockResponse) 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 ErrIntOverflowRpc
			}
			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: BlockResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: BlockResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Ok", wireType)
			}
			var v int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRpc
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[iNdEx]
				iNdEx++
				v |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.Ok = bool(v != 0)
		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 ErrIntOverflowRpc
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthRpc
			}
			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{}
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipRpc(data[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthRpc
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *PutBlockRequest) 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 ErrIntOverflowRpc
			}
			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: PutBlockRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: PutBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Refs", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRpc
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[iNdEx]
				iNdEx++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthRpc
			}
			postIndex := iNdEx + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Refs = append(m.Refs, &BlockRef{})
			if err := m.Refs[len(m.Refs)-1].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 ErrIntOverflowRpc
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthRpc
			}
			postIndex := iNdEx + byteLen
			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
		default:
			iNdEx = preIndex
			skippy, err := skipRpc(data[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthRpc
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *PutResponse) 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 ErrIntOverflowRpc
			}
			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: PutResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: PutResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Ok", wireType)
			}
			var v int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRpc
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[iNdEx]
				iNdEx++
				v |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.Ok = bool(v != 0)
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Err", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRpc
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[iNdEx]
				iNdEx++
				stringLen |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthRpc
			}
			postIndex := iNdEx + intStringLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Err = string(data[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipRpc(data[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthRpc
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *RebalanceCheckRequest) 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 ErrIntOverflowRpc
			}
			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: RebalanceCheckRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: RebalanceCheckRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field BlockRefs", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRpc
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[iNdEx]
				iNdEx++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthRpc
			}
			postIndex := iNdEx + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.BlockRefs = append(m.BlockRefs, &BlockRef{})
			if err := m.BlockRefs[len(m.BlockRefs)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipRpc(data[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthRpc
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *RebalanceCheckResponse) 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 ErrIntOverflowRpc
			}
			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: RebalanceCheckResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: RebalanceCheckResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Valid", wireType)
			}
			var v int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRpc
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[iNdEx]
				iNdEx++
				v |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.Valid = append(m.Valid, bool(v != 0))
		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 ErrIntOverflowRpc
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[iNdEx]
				iNdEx++
				m.Status |= (int32(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipRpc(data[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthRpc
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipRpc(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, ErrIntOverflowRpc
			}
			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, ErrIntOverflowRpc
				}
				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, ErrIntOverflowRpc
				}
				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, ErrInvalidLengthRpc
			}
			return iNdEx, nil
		case 3:
			for {
				var innerWire uint64
				var start int = iNdEx
				for shift := uint(0); ; shift += 7 {
					if shift >= 64 {
						return 0, ErrIntOverflowRpc
					}
					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 := skipRpc(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 (
	ErrInvalidLengthRpc = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowRpc   = fmt.Errorf("proto: integer overflow")
)

var fileDescriptorRpc = []byte{
	// 365 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x92, 0xcf, 0x4e, 0xf2, 0x40,
	0x14, 0xc5, 0xbf, 0xf2, 0x2f, 0x70, 0x5b, 0xf8, 0xcc, 0x28, 0x4a, 0x9a, 0xd8, 0x98, 0x4a, 0x8c,
	0x2e, 0x2c, 0x09, 0x98, 0xe8, 0xc6, 0x85, 0xf8, 0x00, 0x1a, 0x74, 0x6f, 0xa6, 0x65, 0x28, 0x84,
	0xc2, 0x60, 0x67, 0xea, 0x73, 0xf8, 0x18, 0x3e, 0x82, 0x4b, 0x97, 0xee, 0xf4, 0x11, 0x50, 0x5f,
	0xc2, 0xa5, 0x97, 0x69, 0x41, 0x69, 0x60, 0x71, 0x92, 0xb9, 0xdc, 0x7b, 0xcf, 0xef, 0x72, 0x52,
	0x28, 0x85, 0x13, 0xcf, 0x99, 0x84, 0x5c, 0x72, 0x52, 0x18, 0xf1, 0x2e, 0x0b, 0x84, 0x79, 0xec,
	0x0f, 0x64, 0x3f, 0x72, 0x1d, 0x8f, 0x8f, 0x1a, 0x3e, 0xf7, 0x79, 0x43, 0xb5, 0xdd, 0xa8, 0xa7,
	0x2a, 0x55, 0xa8, 0x57, 0xbc, 0x66, 0xea, 0x92, 0x87, 0x91, 0x88, 0x0b, 0xbb, 0x05, 0x46, 0x3b,
	0xe0, 0xde, 0xb0, 0xc3, 0xee, 0x23, 0x26, 0x24, 0xd9, 0x87, 0x92, 0x3b, 0xab, 0xef, 0x42, 0xd6,
	0xab, 0x69, 0x7b, 0xda, 0xa1, 0xde, 0xdc, 0x70, 0x62, 0x8e, 0x93, 0x0c, 0xf6, 0xec, 0x23, 0x28,
	0x27, 0x6f, 0x31, 0xe1, 0x63, 0xc1, 0x08, 0x40, 0x86, 0x0f, 0xd5, 0x78, 0x91, 0x18, 0x90, 0xeb,
	0x52, 0x49, 0x6b, 0x19, 0xac, 0x0c, 0xfb, 0x02, 0xfe, 0x5f, 0x47, 0x72, 0x09, 0x61, 0x41, 0x0e,
	0xcd, 0x05, 0x8e, 0x67, 0x57, 0xb9, 0x93, 0x0a, 0x14, 0xd4, 0x09, 0x02, 0x2d, 0xb2, 0x68, 0x71,
	0x00, 0x3a, 0x5a, 0xac, 0x64, 0xe9, 0x90, 0x65, 0x61, 0xa8, 0x50, 0x25, 0xfb, 0x1c, 0xaa, 0x1d,
	0xe6, 0xd2, 0x80, 0x8e, 0x3d, 0x76, 0xd9, 0x67, 0xbf, 0xc0, 0x3a, 0xc0, 0xe2, 0x3f, 0xad, 0xc5,
	0xda, 0xa7, 0xb0, 0x9d, 0x5e, 0x4f, 0x88, 0x65, 0xc8, 0x3f, 0xd0, 0x60, 0xd0, 0x55, 0xab, 0xc5,
	0xd9, 0x7d, 0x42, 0x52, 0x19, 0x09, 0xc5, 0xcd, 0x37, 0xdf, 0x34, 0x30, 0x6e, 0x67, 0x91, 0xde,
	0x60, 0xb0, 0xd4, 0x67, 0xe4, 0x04, 0xf2, 0xca, 0x95, 0x6c, 0xa5, 0x20, 0xea, 0x1c, 0xb3, 0x9a,
	0xfa, 0x35, 0xa1, 0x9c, 0x41, 0x71, 0x9e, 0x14, 0xd9, 0x99, 0x8f, 0xa4, 0xb2, 0x33, 0x37, 0xff,
	0x34, 0x16, 0x9b, 0x57, 0x50, 0x59, 0xbe, 0x9c, 0xec, 0xce, 0xc7, 0x56, 0x06, 0x62, 0x5a, 0xeb,
	0xda, 0xb1, 0x61, 0xbb, 0x3e, 0xfd, 0xb0, 0xb4, 0x6f, 0xd4, 0xd3, 0xa7, 0xa5, 0x3d, 0xa3, 0x5e,
	0x50, 0xaf, 0xa8, 0x77, 0xd4, 0x14, 0xf5, 0xf8, 0x65, 0xfd, 0x73, 0x0b, 0xea, 0x0b, 0x6a, 0xfd,
	0x04, 0x00, 0x00, 0xff, 0xff, 0x80, 0x1e, 0x4f, 0xc2, 0x92, 0x02, 0x00, 0x00,
}
