// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: electra/meter/billingcycles.proto

package types

import (
	fmt "fmt"
	proto "github.com/gogo/protobuf/proto"
	io "io"
	math "math"
	math_bits "math/bits"
)

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

type Billingcycles struct {
	CycleID  uint64 `protobuf:"varint,1,opt,name=cycleID,proto3" json:"cycleID,omitempty"`
	Begin    uint64 `protobuf:"varint,2,opt,name=begin,proto3" json:"begin,omitempty"`
	End      uint64 `protobuf:"varint,3,opt,name=end,proto3" json:"end,omitempty"`
	Whin     uint64 `protobuf:"varint,4,opt,name=whin,proto3" json:"whin,omitempty"`
	Whout    uint64 `protobuf:"varint,5,opt,name=whout,proto3" json:"whout,omitempty"`
	Moneyin  uint64 `protobuf:"varint,6,opt,name=moneyin,proto3" json:"moneyin,omitempty"`
	Moneyout uint64 `protobuf:"varint,7,opt,name=moneyout,proto3" json:"moneyout,omitempty"`
	Curency  string `protobuf:"bytes,8,opt,name=curency,proto3" json:"curency,omitempty"`
	Valid    bool   `protobuf:"varint,9,opt,name=valid,proto3" json:"valid,omitempty"`
	Paid     bool   `protobuf:"varint,10,opt,name=paid,proto3" json:"paid,omitempty"`
	Creator  string `protobuf:"bytes,11,opt,name=creator,proto3" json:"creator,omitempty"`
}

func (m *Billingcycles) Reset()         { *m = Billingcycles{} }
func (m *Billingcycles) String() string { return proto.CompactTextString(m) }
func (*Billingcycles) ProtoMessage()    {}
func (*Billingcycles) Descriptor() ([]byte, []int) {
	return fileDescriptor_2953d2125b8d9526, []int{0}
}
func (m *Billingcycles) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *Billingcycles) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_Billingcycles.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *Billingcycles) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Billingcycles.Merge(m, src)
}
func (m *Billingcycles) XXX_Size() int {
	return m.Size()
}
func (m *Billingcycles) XXX_DiscardUnknown() {
	xxx_messageInfo_Billingcycles.DiscardUnknown(m)
}

var xxx_messageInfo_Billingcycles proto.InternalMessageInfo

func (m *Billingcycles) GetCycleID() uint64 {
	if m != nil {
		return m.CycleID
	}
	return 0
}

func (m *Billingcycles) GetBegin() uint64 {
	if m != nil {
		return m.Begin
	}
	return 0
}

func (m *Billingcycles) GetEnd() uint64 {
	if m != nil {
		return m.End
	}
	return 0
}

func (m *Billingcycles) GetWhin() uint64 {
	if m != nil {
		return m.Whin
	}
	return 0
}

func (m *Billingcycles) GetWhout() uint64 {
	if m != nil {
		return m.Whout
	}
	return 0
}

func (m *Billingcycles) GetMoneyin() uint64 {
	if m != nil {
		return m.Moneyin
	}
	return 0
}

func (m *Billingcycles) GetMoneyout() uint64 {
	if m != nil {
		return m.Moneyout
	}
	return 0
}

func (m *Billingcycles) GetCurency() string {
	if m != nil {
		return m.Curency
	}
	return ""
}

func (m *Billingcycles) GetValid() bool {
	if m != nil {
		return m.Valid
	}
	return false
}

func (m *Billingcycles) GetPaid() bool {
	if m != nil {
		return m.Paid
	}
	return false
}

func (m *Billingcycles) GetCreator() string {
	if m != nil {
		return m.Creator
	}
	return ""
}

func init() {
	proto.RegisterType((*Billingcycles)(nil), "electra.meter.Billingcycles")
}

func init() { proto.RegisterFile("electra/meter/billingcycles.proto", fileDescriptor_2953d2125b8d9526) }

var fileDescriptor_2953d2125b8d9526 = []byte{
	// 269 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x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0xbc, 0xe6, 0xb5, 0xaa, 0x60, 0x1d, 0xb3, 0x24, 0xca, 0x3c, 0xb8, 0x7b, 0xda, 0x5c, 0x55, 0xc0,
	0xc9, 0x24, 0x4d, 0x7f, 0x18, 0xcc, 0x6d, 0x63, 0xe0, 0xdf, 0xf8, 0x87, 0xc7, 0x5d, 0xfa, 0xd9,
	0x4b, 0x76, 0xed, 0x25, 0xfb, 0xee, 0x25, 0xfb, 0x18, 0x64, 0x70, 0x1d, 0x64, 0xf0, 0x35, 0xc8,
	0xe0, 0xe5, 0x76, 0x6a, 0xf7, 0x6d, 0xec, 0xd7, 0x76, 0x2d, 0x9e, 0x8a, 0x25, 0x15, 0xfb, 0xf8,
	0x13, 0x00, 0x00, 0xff, 0xff, 0x8e, 0x3c, 0x0a, 0x75, 0x7d, 0x01, 0x00, 0x00,
}

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

func (m *Billingcycles) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *Billingcycles) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Creator) > 0 {
		i -= len(m.Creator)
		copy(dAtA[i:], m.Creator)
		i = encodeVarintBillingcycles(dAtA, i, uint64(len(m.Creator)))
		i--
		dAtA[i] = 0x5a
	}
	if m.Paid {
		i--
		if m.Paid {
			dAtA[i] = 1
		} else {
			dAtA[i] = 0
		}
		i--
		dAtA[i] = 0x50
	}
	if m.Valid {
		i--
		if m.Valid {
			dAtA[i] = 1
		} else {
			dAtA[i] = 0
		}
		i--
		dAtA[i] = 0x48
	}
	if len(m.Curency) > 0 {
		i -= len(m.Curency)
		copy(dAtA[i:], m.Curency)
		i = encodeVarintBillingcycles(dAtA, i, uint64(len(m.Curency)))
		i--
		dAtA[i] = 0x42
	}
	if m.Moneyout != 0 {
		i = encodeVarintBillingcycles(dAtA, i, uint64(m.Moneyout))
		i--
		dAtA[i] = 0x38
	}
	if m.Moneyin != 0 {
		i = encodeVarintBillingcycles(dAtA, i, uint64(m.Moneyin))
		i--
		dAtA[i] = 0x30
	}
	if m.Whout != 0 {
		i = encodeVarintBillingcycles(dAtA, i, uint64(m.Whout))
		i--
		dAtA[i] = 0x28
	}
	if m.Whin != 0 {
		i = encodeVarintBillingcycles(dAtA, i, uint64(m.Whin))
		i--
		dAtA[i] = 0x20
	}
	if m.End != 0 {
		i = encodeVarintBillingcycles(dAtA, i, uint64(m.End))
		i--
		dAtA[i] = 0x18
	}
	if m.Begin != 0 {
		i = encodeVarintBillingcycles(dAtA, i, uint64(m.Begin))
		i--
		dAtA[i] = 0x10
	}
	if m.CycleID != 0 {
		i = encodeVarintBillingcycles(dAtA, i, uint64(m.CycleID))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

func encodeVarintBillingcycles(dAtA []byte, offset int, v uint64) int {
	offset -= sovBillingcycles(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *Billingcycles) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.CycleID != 0 {
		n += 1 + sovBillingcycles(uint64(m.CycleID))
	}
	if m.Begin != 0 {
		n += 1 + sovBillingcycles(uint64(m.Begin))
	}
	if m.End != 0 {
		n += 1 + sovBillingcycles(uint64(m.End))
	}
	if m.Whin != 0 {
		n += 1 + sovBillingcycles(uint64(m.Whin))
	}
	if m.Whout != 0 {
		n += 1 + sovBillingcycles(uint64(m.Whout))
	}
	if m.Moneyin != 0 {
		n += 1 + sovBillingcycles(uint64(m.Moneyin))
	}
	if m.Moneyout != 0 {
		n += 1 + sovBillingcycles(uint64(m.Moneyout))
	}
	l = len(m.Curency)
	if l > 0 {
		n += 1 + l + sovBillingcycles(uint64(l))
	}
	if m.Valid {
		n += 2
	}
	if m.Paid {
		n += 2
	}
	l = len(m.Creator)
	if l > 0 {
		n += 1 + l + sovBillingcycles(uint64(l))
	}
	return n
}

func sovBillingcycles(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozBillingcycles(x uint64) (n int) {
	return sovBillingcycles(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Billingcycles) 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 ErrIntOverflowBillingcycles
			}
			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: Billingcycles: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: Billingcycles: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field CycleID", wireType)
			}
			m.CycleID = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowBillingcycles
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.CycleID |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Begin", wireType)
			}
			m.Begin = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowBillingcycles
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Begin |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 3:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field End", wireType)
			}
			m.End = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowBillingcycles
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.End |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 4:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Whin", wireType)
			}
			m.Whin = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowBillingcycles
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Whin |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 5:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Whout", wireType)
			}
			m.Whout = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowBillingcycles
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Whout |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 6:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Moneyin", wireType)
			}
			m.Moneyin = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowBillingcycles
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Moneyin |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 7:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Moneyout", wireType)
			}
			m.Moneyout = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowBillingcycles
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Moneyout |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 8:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Curency", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowBillingcycles
				}
				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 ErrInvalidLengthBillingcycles
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthBillingcycles
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Curency = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 9:
			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 ErrIntOverflowBillingcycles
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				v |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.Valid = bool(v != 0)
		case 10:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Paid", wireType)
			}
			var v int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowBillingcycles
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				v |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.Paid = bool(v != 0)
		case 11:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowBillingcycles
				}
				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 ErrInvalidLengthBillingcycles
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthBillingcycles
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Creator = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipBillingcycles(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthBillingcycles
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipBillingcycles(dAtA []byte) (n int, err error) {
	l := len(dAtA)
	iNdEx := 0
	depth := 0
	for iNdEx < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return 0, ErrIntOverflowBillingcycles
			}
			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, ErrIntOverflowBillingcycles
				}
				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, ErrIntOverflowBillingcycles
				}
				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, ErrInvalidLengthBillingcycles
			}
			iNdEx += length
		case 3:
			depth++
		case 4:
			if depth == 0 {
				return 0, ErrUnexpectedEndOfGroupBillingcycles
			}
			depth--
		case 5:
			iNdEx += 4
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
		if iNdEx < 0 {
			return 0, ErrInvalidLengthBillingcycles
		}
		if depth == 0 {
			return iNdEx, nil
		}
	}
	return 0, io.ErrUnexpectedEOF
}

var (
	ErrInvalidLengthBillingcycles        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBillingcycles          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupBillingcycles = fmt.Errorf("proto: unexpected end of group")
)
