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

package models

import (
	fmt "fmt"
	_ "github.com/gogo/protobuf/gogoproto"
	proto "github.com/gogo/protobuf/proto"
	io "io"
	math "math"
	math_bits "math/bits"
	reflect "reflect"
	strconv "strconv"
	strings "strings"
)

// 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 Error_Type int32

const (
	Error_UnknownError               Error_Type = 0
	Error_InvalidRecord              Error_Type = 3
	Error_InvalidRequest             Error_Type = 4
	Error_InvalidResponse            Error_Type = 5
	Error_InvalidProtobufMessage     Error_Type = 6
	Error_InvalidJSON                Error_Type = 7
	Error_FailedToOpenEnvelope       Error_Type = 8
	Error_InvalidStateTransition     Error_Type = 9
	Error_ResourceConflict           Error_Type = 11
	Error_ResourceExists             Error_Type = 12
	Error_ResourceNotFound           Error_Type = 13
	Error_RouterError                Error_Type = 14
	Error_ActualLRPCannotBeClaimed   Error_Type = 15
	Error_ActualLRPCannotBeStarted   Error_Type = 16
	Error_ActualLRPCannotBeCrashed   Error_Type = 17
	Error_ActualLRPCannotBeFailed    Error_Type = 18
	Error_ActualLRPCannotBeRemoved   Error_Type = 19
	Error_ActualLRPCannotBeUnclaimed Error_Type = 21
	Error_RunningOnDifferentCell     Error_Type = 24
	Error_GUIDGeneration             Error_Type = 26
	Error_Deserialize                Error_Type = 27
	Error_Deadlock                   Error_Type = 28
	Error_Unrecoverable              Error_Type = 29
	Error_LockCollision              Error_Type = 30
	Error_Timeout                    Error_Type = 31
)

var Error_Type_name = map[int32]string{
	0:  "UnknownError",
	3:  "InvalidRecord",
	4:  "InvalidRequest",
	5:  "InvalidResponse",
	6:  "InvalidProtobufMessage",
	7:  "InvalidJSON",
	8:  "FailedToOpenEnvelope",
	9:  "InvalidStateTransition",
	11: "ResourceConflict",
	12: "ResourceExists",
	13: "ResourceNotFound",
	14: "RouterError",
	15: "ActualLRPCannotBeClaimed",
	16: "ActualLRPCannotBeStarted",
	17: "ActualLRPCannotBeCrashed",
	18: "ActualLRPCannotBeFailed",
	19: "ActualLRPCannotBeRemoved",
	21: "ActualLRPCannotBeUnclaimed",
	24: "RunningOnDifferentCell",
	26: "GUIDGeneration",
	27: "Deserialize",
	28: "Deadlock",
	29: "Unrecoverable",
	30: "LockCollision",
	31: "Timeout",
}

var Error_Type_value = map[string]int32{
	"UnknownError":               0,
	"InvalidRecord":              3,
	"InvalidRequest":             4,
	"InvalidResponse":            5,
	"InvalidProtobufMessage":     6,
	"InvalidJSON":                7,
	"FailedToOpenEnvelope":       8,
	"InvalidStateTransition":     9,
	"ResourceConflict":           11,
	"ResourceExists":             12,
	"ResourceNotFound":           13,
	"RouterError":                14,
	"ActualLRPCannotBeClaimed":   15,
	"ActualLRPCannotBeStarted":   16,
	"ActualLRPCannotBeCrashed":   17,
	"ActualLRPCannotBeFailed":    18,
	"ActualLRPCannotBeRemoved":   19,
	"ActualLRPCannotBeUnclaimed": 21,
	"RunningOnDifferentCell":     24,
	"GUIDGeneration":             26,
	"Deserialize":                27,
	"Deadlock":                   28,
	"Unrecoverable":              29,
	"LockCollision":              30,
	"Timeout":                    31,
}

func (Error_Type) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_0579b252106fcf4a, []int{0, 0}
}

type Error struct {
	Type    Error_Type `protobuf:"varint,1,opt,name=type,proto3,enum=models.Error_Type" json:"type"`
	Message string     `protobuf:"bytes,2,opt,name=message,proto3" json:"message"`
}

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

var xxx_messageInfo_Error proto.InternalMessageInfo

func (m *Error) GetType() Error_Type {
	if m != nil {
		return m.Type
	}
	return Error_UnknownError
}

func (m *Error) GetMessage() string {
	if m != nil {
		return m.Message
	}
	return ""
}

func init() {
	proto.RegisterEnum("models.Error_Type", Error_Type_name, Error_Type_value)
	proto.RegisterType((*Error)(nil), "models.Error")
}

func init() { proto.RegisterFile("error.proto", fileDescriptor_0579b252106fcf4a) }

var fileDescriptor_0579b252106fcf4a = []byte{
	// 585 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x53, 0xcd, 0x4e, 0xdb, 0x4c,
	0x14, 0xb5, 0xf9, 0x0c, 0x98, 0x09, 0x3f, 0x97, 0x21, 0x1f, 0x84, 0x40, 0x07, 0x64, 0xa9, 0x12,
	0x9b, 0x86, 0xaa, 0xed, 0x0b, 0x34, 0x09, 0x20, 0x2a, 0x0a, 0xc8, 0x24, 0x0f, 0x30, 0xb1, 0x6f,
	0xc2, 0x88, 0xc9, 0x4c, 0x3a, 0x1e, 0xa7, 0xa5, 0xab, 0x3e, 0x42, 0x1f, 0xa3, 0x8f, 0xd2, 0x45,
	0x17, 0x2c, 0x59, 0xa1, 0x62, 0x36, 0x2d, 0x2b, 0x1e, 0xa1, 0xb2, 0x13, 0x10, 0x12, 0x6c, 0xac,
	0x7b, 0xcf, 0xb9, 0xe7, 0xf8, 0x9e, 0x6b, 0x99, 0x94, 0xd0, 0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xc1, 0x7a, 0xfe, 0xcd, 0xdb, 0xca, 0x60, 0xa4, 0x87, 0x68,
	0x78, 0x47, 0x22, 0xbc, 0xc8, 0xa1, 0x03, 0x1d, 0x9d, 0x35, 0xb4, 0x94, 0x22, 0xc9, 0x4d, 0x18,
	0x2d, 0x91, 0xe9, 0x96, 0xe8, 0xa3, 0x4e, 0x2d, 0x6c, 0x04, 0x9e, 0xef, 0x82, 0x1b, 0x78, 0xfe,
	0x04, 0x4c, 0x04, 0x9e, 0x4f, 0x80, 0x04, 0x9e, 0x5f, 0x86, 0x72, 0xe0, 0xf9, 0xcb, 0xb0, 0x1c,
	0x78, 0xfe, 0x0a, 0xac, 0x04, 0x9e, 0xbf, 0x0a, 0xab, 0xf5, 0x77, 0x17, 0xd7, 0xcc, 0xbd, 0xbc,
	0x66, 0xce, 0xdd, 0x35, 0x73, 0xbf, 0x65, 0xcc, 0xfd, 0x91, 0x31, 0xe7, 0x67, 0xc6, 0xdc, 0x8b,
	0x8c, 0xb9, 0xbf, 0x33, 0xe6, 0xfe, 0xc9, 0x98, 0x73, 0x97, 0x31, 0xf7, 0xfb, 0x0d, 0x73, 0x2e,
	0x6e, 0x98, 0x73, 0x79, 0xc3, 0x9c, 0xce, 0x54, 0xf1, 0x2f, 0xbc, 0xfd, 0x17, 0x00, 0x00, 0xff,
	0xff, 0xf2, 0xb4, 0xa0, 0xf2, 0x51, 0x03, 0x00, 0x00,
}

func (x Error_Type) String() string {
	s, ok := Error_Type_name[int32(x)]
	if ok {
		return s
	}
	return strconv.Itoa(int(x))
}
func (this *Error) GoString() string {
	if this == nil {
		return "nil"
	}
	s := make([]string, 0, 6)
	s = append(s, "&models.Error{")
	s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n")
	s = append(s, "Message: "+fmt.Sprintf("%#v", this.Message)+",\n")
	s = append(s, "}")
	return strings.Join(s, "")
}
func valueToGoStringError(v interface{}, typ string) string {
	rv := reflect.ValueOf(v)
	if rv.IsNil() {
		return "nil"
	}
	pv := reflect.Indirect(rv).Interface()
	return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
}
func (m *Error) 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 *Error) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *Error) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Message) > 0 {
		i -= len(m.Message)
		copy(dAtA[i:], m.Message)
		i = encodeVarintError(dAtA, i, uint64(len(m.Message)))
		i--
		dAtA[i] = 0x12
	}
	if m.Type != 0 {
		i = encodeVarintError(dAtA, i, uint64(m.Type))
		i--
		dAtA[i] = 0x8
	}
	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 *Error) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Type != 0 {
		n += 1 + sovError(uint64(m.Type))
	}
	l = len(m.Message)
	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 (this *Error) String() string {
	if this == nil {
		return "nil"
	}
	s := strings.Join([]string{`&Error{`,
		`Type:` + fmt.Sprintf("%v", this.Type) + `,`,
		`Message:` + fmt.Sprintf("%v", this.Message) + `,`,
		`}`,
	}, "")
	return s
}
func valueToStringError(v interface{}) string {
	rv := reflect.ValueOf(v)
	if rv.IsNil() {
		return "nil"
	}
	pv := reflect.Indirect(rv).Interface()
	return fmt.Sprintf("*%v", pv)
}
func (m *Error) 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: Error: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
			}
			m.Type = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowError
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Type |= Error_Type(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Message", 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.Message = 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")
)
