// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: cheqd/resource/v2/fee.proto

package types

import (
	cosmossdk_io_math "cosmossdk.io/math"
	fmt "fmt"
	_ "github.com/cosmos/cosmos-proto"
	types "github.com/cosmos/cosmos-sdk/types"
	_ "github.com/cosmos/cosmos-sdk/types/tx/amino"
	_ "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

// FeeParams defines the parameters for the cheqd Resource module fixed fee.
// Creation requests for different IANA media types are charged different fees.
type FeeParams struct {
	// Fixed fee for creating a resource with media type 'image/*'
	//
	// Default: 10 CHEQ or 10000000000ncheq
	Image types.Coin `protobuf:"bytes,1,opt,name=image,proto3" json:"image"`
	// Fixed fee for creating a resource with media type 'application/json'
	//
	// Default: 2.5 CHEQ or 2500000000ncheq
	Json types.Coin `protobuf:"bytes,2,opt,name=json,proto3" json:"json"`
	// Fixed fee for creating a resource with all other media types
	//
	// Default: 5 CHEQ or 5000000000ncheq
	Default types.Coin `protobuf:"bytes,3,opt,name=default,proto3" json:"default"`
	// Percentage of the fixed fee that will be burned
	//
	// Default: 0.5 (50%)
	BurnFactor cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=burn_factor,json=burnFactor,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"burn_factor"`
}

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

var xxx_messageInfo_FeeParams proto.InternalMessageInfo

func (m *FeeParams) GetImage() types.Coin {
	if m != nil {
		return m.Image
	}
	return types.Coin{}
}

func (m *FeeParams) GetJson() types.Coin {
	if m != nil {
		return m.Json
	}
	return types.Coin{}
}

func (m *FeeParams) GetDefault() types.Coin {
	if m != nil {
		return m.Default
	}
	return types.Coin{}
}

func init() {
	proto.RegisterType((*FeeParams)(nil), "cheqd.resource.v2.FeeParams")
}

func init() { proto.RegisterFile("cheqd/resource/v2/fee.proto", fileDescriptor_133abe56c2e24f1e) }

var fileDescriptor_133abe56c2e24f1e = []byte{
	// 346 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x51, 0xbf, 0x4f, 0xfa, 0x40,
	0x14, 0xef, 0xf1, 0xe5, 0xab, 0xe1, 0x98, 0x68, 0x1c, 0x0a, 0x24, 0x07, 0x71, 0x22, 0x46, 0xee,
	0x02, 0x44, 0x13, 0x57, 0x24, 0x0c, 0xc6, 0xc1, 0xb0, 0x98, 0xb8, 0x90, 0xeb, 0xf5, 0x51, 0xaa,
	0xb6, 0x87, 0xbd, 0x96, 0xc8, 0xdf, 0xe0, 0xe2, 0x9f, 0xc1, 0xe8, 0xe0, 0x1f, 0xc1, 0x48, 0x9c,
	0x8c, 0x03, 0x31, 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0x7a, 0x92, 0xf9, 0x3c, 0x9a, 0xd2,
	0x6b, 0x70, 0xb9, 0x58, 0x0c, 0x40, 0x7c, 0xbc, 0xb7, 0x71, 0xfe, 0xc9, 0x00, 0xc4, 0xf2, 0xe7,
	0xed, 0x04, 0x8d, 0x70, 0x1a, 0x35, 0xcc, 0x92, 0xfa, 0x57, 0xcb, 0x84, 0xa0, 0x55, 0x42, 0xd0,
	0x3a, 0x21, 0xe8, 0x3b, 0x21, 0xe8, 0x75, 0x4b, 0x8c, 0xf5, 0x96, 0x18, 0x9f, 0x5b, 0x62, 0xdc,
	0x9d, 0xba, 0x5e, 0x34, 0x8d, 0x6d, 0x2a, 0xa4, 0xcf, 0xf4, 0x29, 0xb3, 0xda, 0x0e, 0xa4, 0x03,
	0xec, 0xf9, 0xef, 0xae, 0xd1, 0x62, 0x06, 0xca, 0x3e, 0xc8, 0x16, 0xdc, 0xfb, 0x0d, 0x00, 0x00,
	0xff, 0xff, 0x50, 0x99, 0xc5, 0xa5, 0xf6, 0x01, 0x00, 0x00,
}

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

	that1, ok := that.(*FeeParams)
	if !ok {
		that2, ok := that.(FeeParams)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		return this == nil
	} else if this == nil {
		return false
	}
	if !this.Image.Equal(&that1.Image) {
		return false
	}
	if !this.Json.Equal(&that1.Json) {
		return false
	}
	if !this.Default.Equal(&that1.Default) {
		return false
	}
	if !this.BurnFactor.Equal(that1.BurnFactor) {
		return false
	}
	return true
}
func (m *FeeParams) 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 *FeeParams) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *FeeParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	{
		size := m.BurnFactor.Size()
		i -= size
		if _, err := m.BurnFactor.MarshalTo(dAtA[i:]); err != nil {
			return 0, err
		}
		i = encodeVarintFee(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x22
	{
		size, err := m.Default.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintFee(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x1a
	{
		size, err := m.Json.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintFee(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x12
	{
		size, err := m.Image.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintFee(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0xa
	return len(dAtA) - i, nil
}

func encodeVarintFee(dAtA []byte, offset int, v uint64) int {
	offset -= sovFee(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *FeeParams) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.Image.Size()
	n += 1 + l + sovFee(uint64(l))
	l = m.Json.Size()
	n += 1 + l + sovFee(uint64(l))
	l = m.Default.Size()
	n += 1 + l + sovFee(uint64(l))
	l = m.BurnFactor.Size()
	n += 1 + l + sovFee(uint64(l))
	return n
}

func sovFee(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozFee(x uint64) (n int) {
	return sovFee(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *FeeParams) 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 ErrIntOverflowFee
			}
			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: FeeParams: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: FeeParams: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowFee
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthFee
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthFee
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Json", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowFee
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthFee
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthFee
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.Json.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Default", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowFee
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthFee
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthFee
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.Default.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field BurnFactor", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowFee
				}
				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 ErrInvalidLengthFee
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthFee
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.BurnFactor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipFee(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthFee
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

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

var (
	ErrInvalidLengthFee        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowFee          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupFee = fmt.Errorf("proto: unexpected end of group")
)
