// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: archway/cwerrors/v1/params.proto

package types

import (
	fmt "fmt"
	types "github.com/cosmos/cosmos-sdk/types"
	_ "github.com/cosmos/gogoproto/gogoproto"
	proto "github.com/cosmos/gogoproto/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

// Params defines the set of parameters for the cwerrors module.
type Params struct {
	// error_stored_time is the block height until which error is stored
	ErrorStoredTime int64 `protobuf:"varint,1,opt,name=error_stored_time,json=errorStoredTime,proto3" json:"error_stored_time,omitempty"`
	// subsciption_fee is the fee required to subscribe to error callbacks
	SubscriptionFee types.Coin `protobuf:"bytes,2,opt,name=subscription_fee,json=subscriptionFee,proto3" json:"subscription_fee"`
	// subscription_period is the period for which the subscription is valid
	SubscriptionPeriod int64 `protobuf:"varint,3,opt,name=subscription_period,json=subscriptionPeriod,proto3" json:"subscription_period,omitempty"`
}

func (m *Params) Reset()         { *m = Params{} }
func (m *Params) String() string { return proto.CompactTextString(m) }
func (*Params) ProtoMessage()    {}
func (*Params) Descriptor() ([]byte, []int) {
	return fileDescriptor_178d89d427939559, []int{0}
}
func (m *Params) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Params.Merge(m, src)
}
func (m *Params) XXX_Size() int {
	return m.Size()
}
func (m *Params) XXX_DiscardUnknown() {
	xxx_messageInfo_Params.DiscardUnknown(m)
}

var xxx_messageInfo_Params proto.InternalMessageInfo

func (m *Params) GetErrorStoredTime() int64 {
	if m != nil {
		return m.ErrorStoredTime
	}
	return 0
}

func (m *Params) GetSubscriptionFee() types.Coin {
	if m != nil {
		return m.SubscriptionFee
	}
	return types.Coin{}
}

func (m *Params) GetSubscriptionPeriod() int64 {
	if m != nil {
		return m.SubscriptionPeriod
	}
	return 0
}

func init() {
	proto.RegisterType((*Params)(nil), "archway.cwerrors.v1.Params")
}

func init() { proto.RegisterFile("archway/cwerrors/v1/params.proto", fileDescriptor_178d89d427939559) }

var fileDescriptor_178d89d427939559 = []byte{
	// 290 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0x31, 0x4e, 0xc3, 0x30,
	0x18, 0x85, 0x63, 0x8a, 0x3a, 0x84, 0xa1, 0x90, 0x32, 0x94, 0x0e, 0xa6, 0x62, 0xaa, 0x90, 0xb0,
	0x15, 0x7a, 0x83, 0x22, 0x31, 0x20, 0x21, 0x55, 0x85, 0x89, 0x25, 0x72, 0xdc, 0x9f, 0xd4, 0x42,
	0xc9, 0x1f, 0xd9, 0x6e, 0x42, 0x6f, 0xc1, 0x55, 0xb8, 0x45, 0xc7, 0x8e, 0x4c, 0x08, 0x25, 0x17,
	0x41, 0x75, 0x52, 0x51, 0x36, 0xdb, 0xdf, 0xf3, 0xfb, 0xa4, 0xe7, 0x8f, 0x84, 0x96, 0xcb, 0x52,
	0xac, 0xb9, 0x2c, 0x41, 0x6b, 0xd4, 0x86, 0x17, 0x21, 0xcf, 0x85, 0x16, 0xa9, 0x61, 0xb9, 0x46,
	0x8b, 0x41, 0xbf, 0x4d, 0xb0, 0x7d, 0x82, 0x15, 0xe1, 0xf0, 0x3c, 0xc1, 0x04, 0x1d, 0xe7, 0xbb,
	0x53, 0x13, 0x1d, 0x52, 0x89, 0x26, 0x45, 0xc3, 0x63, 0x61, 0x80, 0x17, 0x61, 0x0c, 0x56, 0x84,
	0x5c, 0xa2, 0xca, 0x1a, 0x7e, 0xf5, 0x49, 0xfc, 0xee, 0xcc, 0x75, 0x07, 0xd7, 0xfe, 0x99, 0x6b,
	0x8b, 0x8c, 0x45, 0x0d, 0x8b, 0xc8, 0xaa, 0x14, 0x06, 0x64, 0x44, 0xc6, 0x9d, 0x79, 0xcf, 0x81,
	0x27, 0xf7, 0xfe, 0xac, 0x52, 0x08, 0x1e, 0xfc, 0x53, 0xb3, 0x8a, 0x8d, 0xd4, 0x2a, 0xb7, 0x0a,
	0xb3, 0xe8, 0x15, 0x60, 0x70, 0x34, 0x22, 0xe3, 0x93, 0xdb, 0x0b, 0xd6, 0x18, 0xd9, 0xce, 0xc8,
	0x5a, 0x23, 0xbb, 0x43, 0x95, 0x4d, 0x8f, 0x37, 0xdf, 0x97, 0xde, 0xbc, 0x77, 0xf8, 0xf1, 0x1e,
	0x20, 0xe0, 0x7e, 0xff, 0x5f, 0x57, 0x0e, 0x5a, 0xe1, 0x62, 0xd0, 0x71, 0xe6, 0xe0, 0x10, 0xcd,
	0x1c, 0x99, 0x3e, 0x6e, 0x2a, 0x4a, 0xb6, 0x15, 0x25, 0x3f, 0x15, 0x25, 0x1f, 0x35, 0xf5, 0xb6,
	0x35, 0xf5, 0xbe, 0x6a, 0xea, 0xbd, 0x4c, 0x12, 0x65, 0x97, 0xab, 0x98, 0x49, 0x4c, 0x79, 0xbb,
	0xd1, 0x4d, 0x06, 0xb6, 0x44, 0xfd, 0xb6, 0xbf, 0xf3, 0xf7, 0xbf, 0x5d, 0xed, 0x3a, 0x07, 0x13,
	0x77, 0xdd, 0x12, 0x93, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x73, 0xb3, 0xb4, 0x99, 0x78, 0x01,
	0x00, 0x00,
}

func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.SubscriptionPeriod != 0 {
		i = encodeVarintParams(dAtA, i, uint64(m.SubscriptionPeriod))
		i--
		dAtA[i] = 0x18
	}
	{
		size, err := m.SubscriptionFee.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintParams(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x12
	if m.ErrorStoredTime != 0 {
		i = encodeVarintParams(dAtA, i, uint64(m.ErrorStoredTime))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

func encodeVarintParams(dAtA []byte, offset int, v uint64) int {
	offset -= sovParams(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *Params) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.ErrorStoredTime != 0 {
		n += 1 + sovParams(uint64(m.ErrorStoredTime))
	}
	l = m.SubscriptionFee.Size()
	n += 1 + l + sovParams(uint64(l))
	if m.SubscriptionPeriod != 0 {
		n += 1 + sovParams(uint64(m.SubscriptionPeriod))
	}
	return n
}

func sovParams(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozParams(x uint64) (n int) {
	return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Params) 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 ErrIntOverflowParams
			}
			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: Params: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field ErrorStoredTime", wireType)
			}
			m.ErrorStoredTime = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowParams
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.ErrorStoredTime |= int64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field SubscriptionFee", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowParams
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthParams
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthParams
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.SubscriptionFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 3:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field SubscriptionPeriod", wireType)
			}
			m.SubscriptionPeriod = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowParams
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.SubscriptionPeriod |= int64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipParams(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthParams
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipParams(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, ErrIntOverflowParams
			}
			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, ErrIntOverflowParams
				}
				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, ErrIntOverflowParams
				}
				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, ErrInvalidLengthParams
			}
			iNdEx += length
		case 3:
			depth++
		case 4:
			if depth == 0 {
				return 0, ErrUnexpectedEndOfGroupParams
			}
			depth--
		case 5:
			iNdEx += 4
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
		if iNdEx < 0 {
			return 0, ErrInvalidLengthParams
		}
		if depth == 0 {
			return iNdEx, nil
		}
	}
	return 0, io.ErrUnexpectedEOF
}

var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
