// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.30.0
// 	protoc        (unknown)
// source: model/error.proto

package model

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	structpb "google.golang.org/protobuf/types/known/structpb"
	reflect "reflect"
	sync "sync"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

type ErrorCode int32

const (
	ErrorCode_UNKNOWN_ERROR                        ErrorCode = 0
	ErrorCode_RECORD_NOT_FOUND                     ErrorCode = 1
	ErrorCode_UNABLE_TO_LOCATE_PRIMARY_KEY         ErrorCode = 2
	ErrorCode_INTERNAL_ERROR                       ErrorCode = 3
	ErrorCode_PROPERTY_NOT_FOUND                   ErrorCode = 4
	ErrorCode_RECORD_VALIDATION_ERROR              ErrorCode = 5
	ErrorCode_RESOURCE_VALIDATION_ERROR            ErrorCode = 13
	ErrorCode_AUTHENTICATION_FAILED                ErrorCode = 6
	ErrorCode_ALREADY_EXISTS                       ErrorCode = 7
	ErrorCode_ACCESS_DENIED                        ErrorCode = 8
	ErrorCode_BACKEND_ERROR                        ErrorCode = 9
	ErrorCode_UNIQUE_VIOLATION                     ErrorCode = 10
	ErrorCode_REFERENCE_VIOLATION                  ErrorCode = 11
	ErrorCode_RESOURCE_NOT_FOUND                   ErrorCode = 12
	ErrorCode_UNSUPPORTED_OPERATION                ErrorCode = 14
	ErrorCode_EXTERNAL_BACKEND_COMMUNICATION_ERROR ErrorCode = 15
	ErrorCode_EXTERNAL_BACKEND_ERROR               ErrorCode = 16
	ErrorCode_RATE_LIMIT_ERROR                     ErrorCode = 17
)

// Enum value maps for ErrorCode.
var (
	ErrorCode_name = map[int32]string{
		0:  "UNKNOWN_ERROR",
		1:  "RECORD_NOT_FOUND",
		2:  "UNABLE_TO_LOCATE_PRIMARY_KEY",
		3:  "INTERNAL_ERROR",
		4:  "PROPERTY_NOT_FOUND",
		5:  "RECORD_VALIDATION_ERROR",
		13: "RESOURCE_VALIDATION_ERROR",
		6:  "AUTHENTICATION_FAILED",
		7:  "ALREADY_EXISTS",
		8:  "ACCESS_DENIED",
		9:  "BACKEND_ERROR",
		10: "UNIQUE_VIOLATION",
		11: "REFERENCE_VIOLATION",
		12: "RESOURCE_NOT_FOUND",
		14: "UNSUPPORTED_OPERATION",
		15: "EXTERNAL_BACKEND_COMMUNICATION_ERROR",
		16: "EXTERNAL_BACKEND_ERROR",
		17: "RATE_LIMIT_ERROR",
	}
	ErrorCode_value = map[string]int32{
		"UNKNOWN_ERROR":                        0,
		"RECORD_NOT_FOUND":                     1,
		"UNABLE_TO_LOCATE_PRIMARY_KEY":         2,
		"INTERNAL_ERROR":                       3,
		"PROPERTY_NOT_FOUND":                   4,
		"RECORD_VALIDATION_ERROR":              5,
		"RESOURCE_VALIDATION_ERROR":            13,
		"AUTHENTICATION_FAILED":                6,
		"ALREADY_EXISTS":                       7,
		"ACCESS_DENIED":                        8,
		"BACKEND_ERROR":                        9,
		"UNIQUE_VIOLATION":                     10,
		"REFERENCE_VIOLATION":                  11,
		"RESOURCE_NOT_FOUND":                   12,
		"UNSUPPORTED_OPERATION":                14,
		"EXTERNAL_BACKEND_COMMUNICATION_ERROR": 15,
		"EXTERNAL_BACKEND_ERROR":               16,
		"RATE_LIMIT_ERROR":                     17,
	}
)

func (x ErrorCode) Enum() *ErrorCode {
	p := new(ErrorCode)
	*p = x
	return p
}

func (x ErrorCode) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (ErrorCode) Descriptor() protoreflect.EnumDescriptor {
	return file_model_error_proto_enumTypes[0].Descriptor()
}

func (ErrorCode) Type() protoreflect.EnumType {
	return &file_model_error_proto_enumTypes[0]
}

func (x ErrorCode) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use ErrorCode.Descriptor instead.
func (ErrorCode) EnumDescriptor() ([]byte, []int) {
	return file_model_error_proto_rawDescGZIP(), []int{0}
}

type ErrorField struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	RecordId string          `protobuf:"bytes,1,opt,name=recordId,proto3" json:"recordId,omitempty"`
	Property string          `protobuf:"bytes,2,opt,name=property,proto3" json:"property,omitempty"`
	Message  string          `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	Value    *structpb.Value `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
}

func (x *ErrorField) Reset() {
	*x = ErrorField{}
	if protoimpl.UnsafeEnabled {
		mi := &file_model_error_proto_msgTypes[0]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *ErrorField) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*ErrorField) ProtoMessage() {}

func (x *ErrorField) ProtoReflect() protoreflect.Message {
	mi := &file_model_error_proto_msgTypes[0]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use ErrorField.ProtoReflect.Descriptor instead.
func (*ErrorField) Descriptor() ([]byte, []int) {
	return file_model_error_proto_rawDescGZIP(), []int{0}
}

func (x *ErrorField) GetRecordId() string {
	if x != nil {
		return x.RecordId
	}
	return ""
}

func (x *ErrorField) GetProperty() string {
	if x != nil {
		return x.Property
	}
	return ""
}

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

func (x *ErrorField) GetValue() *structpb.Value {
	if x != nil {
		return x.Value
	}
	return nil
}

type Error struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Code    ErrorCode     `protobuf:"varint,1,opt,name=code,proto3,enum=model.ErrorCode" json:"code,omitempty"`
	Message string        `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Fields  []*ErrorField `protobuf:"bytes,3,rep,name=fields,proto3" json:"fields,omitempty"`
}

func (x *Error) Reset() {
	*x = Error{}
	if protoimpl.UnsafeEnabled {
		mi := &file_model_error_proto_msgTypes[1]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *Error) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*Error) ProtoMessage() {}

func (x *Error) ProtoReflect() protoreflect.Message {
	mi := &file_model_error_proto_msgTypes[1]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use Error.ProtoReflect.Descriptor instead.
func (*Error) Descriptor() ([]byte, []int) {
	return file_model_error_proto_rawDescGZIP(), []int{1}
}

func (x *Error) GetCode() ErrorCode {
	if x != nil {
		return x.Code
	}
	return ErrorCode_UNKNOWN_ERROR
}

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

func (x *Error) GetFields() []*ErrorField {
	if x != nil {
		return x.Fields
	}
	return nil
}

var File_model_error_proto protoreflect.FileDescriptor

var file_model_error_proto_rawDesc = []byte{
	0x0a, 0x11, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x70, 0x72,
	0x6f, 0x74, 0x6f, 0x12, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67,
	0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75,
	0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8c, 0x01, 0x0a, 0x0a, 0x45, 0x72, 0x72,
	0x6f, 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x6f, 0x72,
	0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x6f, 0x72,
	0x64, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18,
	0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12,
	0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
	0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c,
	0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
	0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65,
	0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x72, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72,
	0x12, 0x24, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10,
	0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65,
	0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
	0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
	0x12, 0x29, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
	0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x46, 0x69,
	0x65, 0x6c, 0x64, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x2a, 0xd1, 0x03, 0x0a, 0x09,
	0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x4b,
	0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10,
	0x52, 0x45, 0x43, 0x4f, 0x52, 0x44, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44,
	0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x55, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x54, 0x4f, 0x5f,
	0x4c, 0x4f, 0x43, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x52, 0x49, 0x4d, 0x41, 0x52, 0x59, 0x5f, 0x4b,
	0x45, 0x59, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c,
	0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x52, 0x4f, 0x50,
	0x45, 0x52, 0x54, 0x59, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x04,
	0x12, 0x1b, 0x0a, 0x17, 0x52, 0x45, 0x43, 0x4f, 0x52, 0x44, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44,
	0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x05, 0x12, 0x1d, 0x0a,
	0x19, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41,
	0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x0d, 0x12, 0x19, 0x0a, 0x15,
	0x41, 0x55, 0x54, 0x48, 0x45, 0x4e, 0x54, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46,
	0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x06, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x4c, 0x52, 0x45, 0x41,
	0x44, 0x59, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, 0x10, 0x07, 0x12, 0x11, 0x0a, 0x0d, 0x41,
	0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x08, 0x12, 0x11,
	0x0a, 0x0d, 0x42, 0x41, 0x43, 0x4b, 0x45, 0x4e, 0x44, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10,
	0x09, 0x12, 0x14, 0x0a, 0x10, 0x55, 0x4e, 0x49, 0x51, 0x55, 0x45, 0x5f, 0x56, 0x49, 0x4f, 0x4c,
	0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x0a, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x45, 0x46, 0x45, 0x52,
	0x45, 0x4e, 0x43, 0x45, 0x5f, 0x56, 0x49, 0x4f, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x0b,
	0x12, 0x16, 0x0a, 0x12, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x4e, 0x4f, 0x54,
	0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x0c, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x4e, 0x53, 0x55,
	0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x5f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f,
	0x4e, 0x10, 0x0e, 0x12, 0x28, 0x0a, 0x24, 0x45, 0x58, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f,
	0x42, 0x41, 0x43, 0x4b, 0x45, 0x4e, 0x44, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x43,
	0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x0f, 0x12, 0x1a, 0x0a,
	0x16, 0x45, 0x58, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x45, 0x4e,
	0x44, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x10, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x41, 0x54,
	0x45, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x11, 0x42,
	0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70,
	0x69, 0x62, 0x72, 0x65, 0x77, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x72, 0x65, 0x77, 0x2f, 0x70, 0x6b,
	0x67, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}

var (
	file_model_error_proto_rawDescOnce sync.Once
	file_model_error_proto_rawDescData = file_model_error_proto_rawDesc
)

func file_model_error_proto_rawDescGZIP() []byte {
	file_model_error_proto_rawDescOnce.Do(func() {
		file_model_error_proto_rawDescData = protoimpl.X.CompressGZIP(file_model_error_proto_rawDescData)
	})
	return file_model_error_proto_rawDescData
}

var file_model_error_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_model_error_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_model_error_proto_goTypes = []interface{}{
	(ErrorCode)(0),         // 0: model.ErrorCode
	(*ErrorField)(nil),     // 1: model.ErrorField
	(*Error)(nil),          // 2: model.Error
	(*structpb.Value)(nil), // 3: google.protobuf.Value
}
var file_model_error_proto_depIdxs = []int32{
	3, // 0: model.ErrorField.value:type_name -> google.protobuf.Value
	0, // 1: model.Error.code:type_name -> model.ErrorCode
	1, // 2: model.Error.fields:type_name -> model.ErrorField
	3, // [3:3] is the sub-list for method output_type
	3, // [3:3] is the sub-list for method input_type
	3, // [3:3] is the sub-list for extension type_name
	3, // [3:3] is the sub-list for extension extendee
	0, // [0:3] is the sub-list for field type_name
}

func init() { file_model_error_proto_init() }
func file_model_error_proto_init() {
	if File_model_error_proto != nil {
		return
	}
	if !protoimpl.UnsafeEnabled {
		file_model_error_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*ErrorField); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
		file_model_error_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*Error); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: file_model_error_proto_rawDesc,
			NumEnums:      1,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_model_error_proto_goTypes,
		DependencyIndexes: file_model_error_proto_depIdxs,
		EnumInfos:         file_model_error_proto_enumTypes,
		MessageInfos:      file_model_error_proto_msgTypes,
	}.Build()
	File_model_error_proto = out.File
	file_model_error_proto_rawDesc = nil
	file_model_error_proto_goTypes = nil
	file_model_error_proto_depIdxs = nil
}
