// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: terra/dyncomm/v1beta1/dyncomm.proto

package types

import (
	fmt "fmt"
	_ "github.com/cosmos/cosmos-proto"
	github_com_cosmos_cosmos_sdk_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 parameters for the dyncomm module.
type Params struct {
	MaxZero       github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=max_zero,json=maxZero,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_zero" yaml:"max_zero"`
	SlopeBase     github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=slope_base,json=slopeBase,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"slope_base" yaml:"slope_base"`
	SlopeVpImpact github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=slope_vp_impact,json=slopeVpImpact,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"slope_vp_impact" yaml:"slope_vp_impact"`
	Cap           github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=cap,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"cap" yaml:"cap"`
}

func (m *Params) Reset()      { *m = Params{} }
func (*Params) ProtoMessage() {}
func (*Params) Descriptor() ([]byte, []int) {
	return fileDescriptor_960758a428b59bad, []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 init() {
	proto.RegisterType((*Params)(nil), "terra.dyncomm.v1beta1.Params")
}

func init() {
	proto.RegisterFile("terra/dyncomm/v1beta1/dyncomm.proto", fileDescriptor_960758a428b59bad)
}

var fileDescriptor_960758a428b59bad = []byte{
	// 360 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0xd2, 0x3f, 0x4f, 0xfa, 0x40,
	0x18, 0x07, 0xf0, 0xf6, 0xc7, 0x2f, 0x08, 0x97, 0x18, 0x62, 0xa3, 0xa6, 0x32, 0xb4, 0x06, 0x13,
	0xe3, 0x42, 0x2b, 0x61, 0x63, 0x24, 0x2c, 0xb2, 0xf8, 0x67, 0x60, 0x20, 0x26, 0xcd, 0xd3, 0xe3,
	0x82, 0x28, 0xe7, 0x5d, 0xee, 0x4e, 0x02, 0x0e, 0xbe, 0x06, 0x47, 0x47, 0x5e, 0x84, 0x2f, 0x82,
	0xc9, 0x10, 0x27, 0xe3, 0x40, 0x0c, 0x2c, 0xce, 0xbe, 0x02, 0xc3, 0x5d, 0x41, 0xc2, 0xc6, 0xd4,
	0x3e, 0x7f, 0xfa, 0xfd, 0x74, 0x78, 0xd0, 0x91, 0x22, 0x42, 0x40, 0xd8, 0x1a, 0xdc, 0x63, 0x46,
	0x69, 0xd8, 0x2b, 0xc5, 0x44, 0x41, 0x69, 0x51, 0x07, 0x5c, 0x30, 0xc5, 0x9c, 0x3d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56, 0x32, 0x2f, 0x43, 0xdf, 0xfa, 0x1e, 0xfa, 0x76, 0xb5, 0x3e, 0x9a, 0x7a, 0xf6,
	0x78, 0xea, 0xd9, 0x5f, 0x53, 0xcf, 0x7e, 0x9e, 0x79, 0xd6, 0x78, 0xe6, 0x59, 0x1f, 0x33, 0xcf,
	0x6a, 0x9e, 0xae, 0x62, 0x5d, 0x90, 0xb2, 0x83, 0x8b, 0xe6, 0xd4, 0x30, 0x13, 0x24, 0xec, 0x95,
	0xc3, 0xfe, 0xf2, 0xe8, 0x34, 0x1d, 0xa7, 0xf5, 0x8d, 0x94, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff,
	0xb4, 0x58, 0x6a, 0x24, 0x92, 0x02, 0x00, 0x00,
}

func (this *Params) Equal(that interface{}) bool {
	if that == nil {
		return this == nil
	}

	that1, ok := that.(*Params)
	if !ok {
		that2, ok := that.(Params)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		return this == nil
	} else if this == nil {
		return false
	}
	if !this.MaxZero.Equal(that1.MaxZero) {
		return false
	}
	if !this.SlopeBase.Equal(that1.SlopeBase) {
		return false
	}
	if !this.SlopeVpImpact.Equal(that1.SlopeVpImpact) {
		return false
	}
	if !this.Cap.Equal(that1.Cap) {
		return false
	}
	return true
}
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
	{
		size := m.Cap.Size()
		i -= size
		if _, err := m.Cap.MarshalTo(dAtA[i:]); err != nil {
			return 0, err
		}
		i = encodeVarintDyncomm(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x22
	{
		size := m.SlopeVpImpact.Size()
		i -= size
		if _, err := m.SlopeVpImpact.MarshalTo(dAtA[i:]); err != nil {
			return 0, err
		}
		i = encodeVarintDyncomm(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x1a
	{
		size := m.SlopeBase.Size()
		i -= size
		if _, err := m.SlopeBase.MarshalTo(dAtA[i:]); err != nil {
			return 0, err
		}
		i = encodeVarintDyncomm(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x12
	{
		size := m.MaxZero.Size()
		i -= size
		if _, err := m.MaxZero.MarshalTo(dAtA[i:]); err != nil {
			return 0, err
		}
		i = encodeVarintDyncomm(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0xa
	return len(dAtA) - i, nil
}

func encodeVarintDyncomm(dAtA []byte, offset int, v uint64) int {
	offset -= sovDyncomm(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
	l = m.MaxZero.Size()
	n += 1 + l + sovDyncomm(uint64(l))
	l = m.SlopeBase.Size()
	n += 1 + l + sovDyncomm(uint64(l))
	l = m.SlopeVpImpact.Size()
	n += 1 + l + sovDyncomm(uint64(l))
	l = m.Cap.Size()
	n += 1 + l + sovDyncomm(uint64(l))
	return n
}

func sovDyncomm(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozDyncomm(x uint64) (n int) {
	return sovDyncomm(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 ErrIntOverflowDyncomm
			}
			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 != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field MaxZero", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowDyncomm
				}
				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 ErrInvalidLengthDyncomm
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthDyncomm
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.MaxZero.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field SlopeBase", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowDyncomm
				}
				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 ErrInvalidLengthDyncomm
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthDyncomm
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.SlopeBase.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field SlopeVpImpact", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowDyncomm
				}
				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 ErrInvalidLengthDyncomm
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthDyncomm
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.SlopeVpImpact.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Cap", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowDyncomm
				}
				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 ErrInvalidLengthDyncomm
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthDyncomm
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.Cap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipDyncomm(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthDyncomm
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

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

var (
	ErrInvalidLengthDyncomm        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDyncomm          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupDyncomm = fmt.Errorf("proto: unexpected end of group")
)
