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

/*
	Package stream is a generated protocol buffer package.

	It is generated from these files:
		lib.proto

	It has these top-level messages:
		TransactionMock
*/
package stream

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"

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.ProtoPackageIsVersion2 // please upgrade the proto package

type TransactionMock struct {
	Version   uint32 `protobuf:"varint,1,opt,name=Version,proto3" json:"Version,omitempty"`
	SenderKey []byte `protobuf:"bytes,3,opt,name=SenderKey,proto3" json:"SenderKey,omitempty"`
	Recipient []byte `protobuf:"bytes,4,opt,name=Recipient,proto3" json:"Recipient,omitempty"`
	Quantity  []byte `protobuf:"bytes,5,opt,name=Quantity,proto3" json:"Quantity,omitempty"`
	Data      []byte `protobuf:"bytes,6,opt,name=Data,proto3" json:"Data,omitempty"`
	AvailGas  uint64 `protobuf:"varint,7,opt,name=AvailGas,proto3" json:"AvailGas,omitempty"`
	GasPrice  []byte `protobuf:"bytes,8,opt,name=GasPrice,proto3" json:"GasPrice,omitempty"`
}

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

func (m *TransactionMock) GetVersion() uint32 {
	if m != nil {
		return m.Version
	}
	return 0
}

func (m *TransactionMock) GetSenderKey() []byte {
	if m != nil {
		return m.SenderKey
	}
	return nil
}

func (m *TransactionMock) GetRecipient() []byte {
	if m != nil {
		return m.Recipient
	}
	return nil
}

func (m *TransactionMock) GetQuantity() []byte {
	if m != nil {
		return m.Quantity
	}
	return nil
}

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

func (m *TransactionMock) GetAvailGas() uint64 {
	if m != nil {
		return m.AvailGas
	}
	return 0
}

func (m *TransactionMock) GetGasPrice() []byte {
	if m != nil {
		return m.GasPrice
	}
	return nil
}

func init() {
	proto.RegisterType((*TransactionMock)(nil), "stream.TransactionMock")
}
func (m *TransactionMock) 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 *TransactionMock) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Version != 0 {
		dAtA[i] = 0x8
		i++
		i = encodeVarintLib(dAtA, i, uint64(m.Version))
	}
	if len(m.SenderKey) > 0 {
		dAtA[i] = 0x1a
		i++
		i = encodeVarintLib(dAtA, i, uint64(len(m.SenderKey)))
		i += copy(dAtA[i:], m.SenderKey)
	}
	if len(m.Recipient) > 0 {
		dAtA[i] = 0x22
		i++
		i = encodeVarintLib(dAtA, i, uint64(len(m.Recipient)))
		i += copy(dAtA[i:], m.Recipient)
	}
	if len(m.Quantity) > 0 {
		dAtA[i] = 0x2a
		i++
		i = encodeVarintLib(dAtA, i, uint64(len(m.Quantity)))
		i += copy(dAtA[i:], m.Quantity)
	}
	if len(m.Data) > 0 {
		dAtA[i] = 0x32
		i++
		i = encodeVarintLib(dAtA, i, uint64(len(m.Data)))
		i += copy(dAtA[i:], m.Data)
	}
	if m.AvailGas != 0 {
		dAtA[i] = 0x38
		i++
		i = encodeVarintLib(dAtA, i, uint64(m.AvailGas))
	}
	if len(m.GasPrice) > 0 {
		dAtA[i] = 0x42
		i++
		i = encodeVarintLib(dAtA, i, uint64(len(m.GasPrice)))
		i += copy(dAtA[i:], m.GasPrice)
	}
	return i, nil
}

func encodeVarintLib(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 *TransactionMock) Size() (n int) {
	var l int
	_ = l
	if m.Version != 0 {
		n += 1 + sovLib(uint64(m.Version))
	}
	l = len(m.SenderKey)
	if l > 0 {
		n += 1 + l + sovLib(uint64(l))
	}
	l = len(m.Recipient)
	if l > 0 {
		n += 1 + l + sovLib(uint64(l))
	}
	l = len(m.Quantity)
	if l > 0 {
		n += 1 + l + sovLib(uint64(l))
	}
	l = len(m.Data)
	if l > 0 {
		n += 1 + l + sovLib(uint64(l))
	}
	if m.AvailGas != 0 {
		n += 1 + sovLib(uint64(m.AvailGas))
	}
	l = len(m.GasPrice)
	if l > 0 {
		n += 1 + l + sovLib(uint64(l))
	}
	return n
}

func sovLib(x uint64) (n int) {
	for {
		n++
		x >>= 7
		if x == 0 {
			break
		}
	}
	return n
}
func sozLib(x uint64) (n int) {
	return sovLib(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *TransactionMock) 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 ErrIntOverflowLib
			}
			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: TransactionMock: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: TransactionMock: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
			}
			m.Version = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowLib
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Version |= (uint32(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field SenderKey", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowLib
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthLib
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.SenderKey = append(m.SenderKey[:0], dAtA[iNdEx:postIndex]...)
			if m.SenderKey == nil {
				m.SenderKey = []byte{}
			}
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowLib
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthLib
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Recipient = append(m.Recipient[:0], dAtA[iNdEx:postIndex]...)
			if m.Recipient == nil {
				m.Recipient = []byte{}
			}
			iNdEx = postIndex
		case 5:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowLib
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthLib
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Quantity = append(m.Quantity[:0], dAtA[iNdEx:postIndex]...)
			if m.Quantity == nil {
				m.Quantity = []byte{}
			}
			iNdEx = postIndex
		case 6:
			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 ErrIntOverflowLib
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthLib
			}
			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
		case 7:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field AvailGas", wireType)
			}
			m.AvailGas = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowLib
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.AvailGas |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 8:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field GasPrice", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowLib
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthLib
			}
			postIndex := iNdEx + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.GasPrice = append(m.GasPrice[:0], dAtA[iNdEx:postIndex]...)
			if m.GasPrice == nil {
				m.GasPrice = []byte{}
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipLib(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthLib
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

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

func init() { proto.RegisterFile("lib.proto", fileDescriptorLib) }

var fileDescriptorLib = []byte{
	// 211 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcc, 0xc9, 0x4c, 0xd2,
	0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2b, 0x2e, 0x29, 0x4a, 0x4d, 0xcc, 0x55, 0x3a, 0xcf,
	0xc8, 0xc5, 0x1f, 0x52, 0x94, 0x98, 0x57, 0x9c, 0x98, 0x5c, 0x92, 0x99, 0x9f, 0xe7, 0x9b, 0x9f,
	0x9c, 0x2d, 0x24, 0xc1, 0xc5, 0x1e, 0x96, 0x5a, 0x54, 0x9c, 0x99, 0x9f, 0x27, 0xc1, 0xa8, 0xc0,
	0xa8, 0xc1, 0x1b, 0x04, 0xe3, 0x0a, 0xc9, 0x70, 0x71, 0x06, 0xa7, 0xe6, 0xa5, 0xa4, 0x16, 0x79,
	0xa7, 0x56, 0x4a, 0x30, 0x2b, 0x30, 0x6a, 0xf0, 0x04, 0x21, 0x04, 0x40, 0xb2, 0x41, 0xa9, 0xc9,
	0x99, 0x05, 0x99, 0xa9, 0x79, 0x25, 0x12, 0x2c, 0x10, 0x59, 0xb8, 0x80, 0x90, 0x14, 0x17, 0x47,
	0x60, 0x69, 0x62, 0x5e, 0x49, 0x66, 0x49, 0xa5, 0x04, 0x2b, 0x58, 0x12, 0xce, 0x17, 0x12, 0xe2,
	0x62, 0x71, 0x49, 0x2c, 0x49, 0x94, 0x60, 0x03, 0x8b, 0x83, 0xd9, 0x20, 0xf5, 0x8e, 0x65, 0x89,
	0x99, 0x39, 0xee, 0x89, 0xc5, 0x12, 0xec, 0x0a, 0x8c, 0x1a, 0x2c, 0x41, 0x70, 0x3e, 0x48, 0xce,
	0x3d, 0xb1, 0x38, 0xa0, 0x28, 0x33, 0x39, 0x55, 0x82, 0x03, 0x62, 0x16, 0x8c, 0xef, 0x24, 0x70,
	0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0xce, 0x78, 0x2c, 0xc7,
	0x90, 0xc4, 0x06, 0xf6, 0xb2, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xc6, 0xb3, 0xaa, 0xd8, 0xff,
	0x00, 0x00, 0x00,
}
