// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: base/types/gfsperrors/error.proto

package gfsperrors

import (
	fmt "fmt"
	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

type GfSpError struct {
	CodeSpace      string `protobuf:"bytes,1,opt,name=code_space,json=codeSpace,proto3" json:"code_space,omitempty"`
	HttpStatusCode int32  `protobuf:"varint,2,opt,name=http_status_code,json=httpStatusCode,proto3" json:"http_status_code,omitempty"`
	InnerCode      int32  `protobuf:"varint,3,opt,name=inner_code,json=innerCode,proto3" json:"inner_code,omitempty"`
	Description    string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
}

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

var xxx_messageInfo_GfSpError proto.InternalMessageInfo

func (m *GfSpError) GetCodeSpace() string {
	if m != nil {
		return m.CodeSpace
	}
	return ""
}

func (m *GfSpError) GetHttpStatusCode() int32 {
	if m != nil {
		return m.HttpStatusCode
	}
	return 0
}

func (m *GfSpError) GetInnerCode() int32 {
	if m != nil {
		return m.InnerCode
	}
	return 0
}

func (m *GfSpError) GetDescription() string {
	if m != nil {
		return m.Description
	}
	return ""
}

func init() {
	proto.RegisterType((*GfSpError)(nil), "base.types.gfsperrors.GfSpError")
}

func init() { proto.RegisterFile("base/types/gfsperrors/error.proto", fileDescriptor_a83019dca109f889) }

var fileDescriptor_a83019dca109f889 = []byte{
	// 253 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xbf, 0x4a, 0xc5, 0x30,
	0x14, 0xc6, 0x1b, 0xff, 0x41, 0x23, 0x88, 0x14, 0x84, 0x2e, 0x86, 0xea, 0xd4, 0xa5, 0xcd, 0xe0,
	0x1b, 0x28, 0xea, 0x7e, 0xbb, 0xb9, 0xd4, 0x26, 0x39, 0x6d, 0x03, 0x9a, 0x84, 0x93, 0x5c, 0xc1,
	0xb7, 0x70, 0xf1, 0x9d, 0x1c, 0xef, 0xe8, 0x28, 0xed, 0x8b, 0x48, 0xe2, 0xa0, 0x83, 0xd3, 0xe1,
	0xfc, 0xbe, 0x1f, 0xe7, 0xc0, 0x47, 0x2f, 0xc4, 0xe0, 0x81, 0x87, 0x57, 0x07, 0x9e, 0x4f, 0xa3,
	0x77, 0x80, 0x68, 0xd1, 0xf3, 0x34, 0x5a, 0x87, 0x36, 0xd8, 0xe2, 0x2c, 0x2a, 0x6d, 0x52, 0xda,
	0x5f, 0xe5, 0xf2, 0x9d, 0xd0, 0xfc, 0x7e, 0xec, 0xdc, 0x6d, 0x5c, 0x8b, 0x73, 0x4a, 0xa5, 0x55,
	0xd0, 0x7b, 0x37, 0x48, 0x28, 0x49, 0x45, 0xea, 0x7c, 0x93, 0x47, 0xd2, 0x45, 0x50, 0xd4, 0xf4,
	0x74, 0x0e, 0xc1, 0xf5, 0x3e, 0x0c, 0x61, 0xeb, 0xfb, 0x18, 0x94, 0x7b, 0x15, 0xa9, 0x0f, 0x37,
	0x27, 0x91, 0x77, 0x09, 0xdf, 0x58, 0x05, 0xf1, 0x90, 0x36, 0x06, 0xf0, 0xc7, 0xd9, 0x4f, 0x4e,
	0x9e, 0x48, 0x8a, 0x2b, 0x7a, 0xac, 0xc0, 0x4b, 0xd4, 0x2e, 0x68, 0x6b, 0xca, 0x83, 0xf4, 0xe8,
	0x2f, 0xba, 0x7e, 0xfc, 0x58, 0x18, 0xd9, 0x2d, 0x8c, 0x7c, 0x2d, 0x8c, 0xbc, 0xad, 0x2c, 0xdb,
	0xad, 0x2c, 0xfb, 0x5c, 0x59, 0xf6, 0x70, 0x37, 0xe9, 0x30, 0x6f, 0x45, 0x2b, 0xed, 0x33, 0x17,
	0x46, 0x34, 0x72, 0x1e, 0xb4, 0xe1, 0x13, 0x02, 0x98, 0x51, 0xc3, 0x93, 0x6a, 0x7c, 0xb0, 0x38,
	0x4c, 0xd0, 0x38, 0xb4, 0x2f, 0x5a, 0x01, 0xf2, 0x7f, 0xcb, 0x11, 0x47, 0xa9, 0x97, 0xab, 0xef,
	0x00, 0x00, 0x00, 0xff, 0xff, 0xbb, 0x0a, 0x0d, 0xa5, 0x3c, 0x01, 0x00, 0x00,
}

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

func (m *GfSpError) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Description) > 0 {
		i -= len(m.Description)
		copy(dAtA[i:], m.Description)
		i = encodeVarintError(dAtA, i, uint64(len(m.Description)))
		i--
		dAtA[i] = 0x22
	}
	if m.InnerCode != 0 {
		i = encodeVarintError(dAtA, i, uint64(m.InnerCode))
		i--
		dAtA[i] = 0x18
	}
	if m.HttpStatusCode != 0 {
		i = encodeVarintError(dAtA, i, uint64(m.HttpStatusCode))
		i--
		dAtA[i] = 0x10
	}
	if len(m.CodeSpace) > 0 {
		i -= len(m.CodeSpace)
		copy(dAtA[i:], m.CodeSpace)
		i = encodeVarintError(dAtA, i, uint64(len(m.CodeSpace)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func encodeVarintError(dAtA []byte, offset int, v uint64) int {
	offset -= sovError(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *GfSpError) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.CodeSpace)
	if l > 0 {
		n += 1 + l + sovError(uint64(l))
	}
	if m.HttpStatusCode != 0 {
		n += 1 + sovError(uint64(m.HttpStatusCode))
	}
	if m.InnerCode != 0 {
		n += 1 + sovError(uint64(m.InnerCode))
	}
	l = len(m.Description)
	if l > 0 {
		n += 1 + l + sovError(uint64(l))
	}
	return n
}

func sovError(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozError(x uint64) (n int) {
	return sovError(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *GfSpError) 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 ErrIntOverflowError
			}
			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: GfSpError: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: GfSpError: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field CodeSpace", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowError
				}
				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 ErrInvalidLengthError
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthError
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.CodeSpace = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field HttpStatusCode", wireType)
			}
			m.HttpStatusCode = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowError
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.HttpStatusCode |= int32(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 3:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field InnerCode", wireType)
			}
			m.InnerCode = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowError
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.InnerCode |= int32(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowError
				}
				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 ErrInvalidLengthError
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthError
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Description = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipError(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthError
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

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

var (
	ErrInvalidLengthError        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowError          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupError = fmt.Errorf("proto: unexpected end of group")
)
