// TODO_TECHDEBT(@adshmh): Use the JsonRpcResponseValidationError in all JSONRPC QoS.
// Include this refactor in PR #253 (JUDGE framework)
//
// TODO_TECHDEBT(@adshmh): The JsonRpcResponseValidationError should only be constructed by the qos/jsonrpc package.
// See the comment in qos/jsonrpc/observation.go
//

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        v5.29.3
// source: path/qos/jsonrpc_validation_error.proto

package qos

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

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)
)

// Enum for different types of JSON-RPC validation errors
type JsonRpcValidationErrorType int32

const (
	// Default/unspecified validation error
	JsonRpcValidationErrorType_JSON_RPC_VALIDATION_ERROR_TYPE_UNSPECIFIED JsonRpcValidationErrorType = 0
	// Response is not a valid JSON-RPC response
	JsonRpcValidationErrorType_JSON_RPC_VALIDATION_ERROR_TYPE_NON_JSONRPC_RESPONSE JsonRpcValidationErrorType = 1
)

// Enum value maps for JsonRpcValidationErrorType.
var (
	JsonRpcValidationErrorType_name = map[int32]string{
		0: "JSON_RPC_VALIDATION_ERROR_TYPE_UNSPECIFIED",
		1: "JSON_RPC_VALIDATION_ERROR_TYPE_NON_JSONRPC_RESPONSE",
	}
	JsonRpcValidationErrorType_value = map[string]int32{
		"JSON_RPC_VALIDATION_ERROR_TYPE_UNSPECIFIED":          0,
		"JSON_RPC_VALIDATION_ERROR_TYPE_NON_JSONRPC_RESPONSE": 1,
	}
)

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

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

func (JsonRpcValidationErrorType) Descriptor() protoreflect.EnumDescriptor {
	return file_path_qos_jsonrpc_validation_error_proto_enumTypes[0].Descriptor()
}

func (JsonRpcValidationErrorType) Type() protoreflect.EnumType {
	return &file_path_qos_jsonrpc_validation_error_proto_enumTypes[0]
}

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

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

// JsonRpcResponseValidationError captures validation errors for JSON-RPC responses
type JsonRpcResponseValidationError struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Type of validation error
	ErrorType JsonRpcValidationErrorType `protobuf:"varint,1,opt,name=error_type,json=errorType,proto3,enum=path.qos.JsonRpcValidationErrorType" json:"error_type,omitempty"`
	// Timestamp when the validation error occurred
	Timestamp     *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *JsonRpcResponseValidationError) Reset() {
	*x = JsonRpcResponseValidationError{}
	mi := &file_path_qos_jsonrpc_validation_error_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*JsonRpcResponseValidationError) ProtoMessage() {}

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

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

func (x *JsonRpcResponseValidationError) GetErrorType() JsonRpcValidationErrorType {
	if x != nil {
		return x.ErrorType
	}
	return JsonRpcValidationErrorType_JSON_RPC_VALIDATION_ERROR_TYPE_UNSPECIFIED
}

func (x *JsonRpcResponseValidationError) GetTimestamp() *timestamppb.Timestamp {
	if x != nil {
		return x.Timestamp
	}
	return nil
}

var File_path_qos_jsonrpc_validation_error_proto protoreflect.FileDescriptor

const file_path_qos_jsonrpc_validation_error_proto_rawDesc = "" +
	"\n" +
	"'path/qos/jsonrpc_validation_error.proto\x12\bpath.qos\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9f\x01\n" +
	"\x1eJsonRpcResponseValidationError\x12C\n" +
	"\n" +
	"error_type\x18\x01 \x01(\x0e2$.path.qos.JsonRpcValidationErrorTypeR\terrorType\x128\n" +
	"\ttimestamp\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\ttimestamp*\x85\x01\n" +
	"\x1aJsonRpcValidationErrorType\x12.\n" +
	"*JSON_RPC_VALIDATION_ERROR_TYPE_UNSPECIFIED\x10\x00\x127\n" +
	"3JSON_RPC_VALIDATION_ERROR_TYPE_NON_JSONRPC_RESPONSE\x10\x01B0Z.github.com/buildwithgrove/path/observation/qosb\x06proto3"

var (
	file_path_qos_jsonrpc_validation_error_proto_rawDescOnce sync.Once
	file_path_qos_jsonrpc_validation_error_proto_rawDescData []byte
)

func file_path_qos_jsonrpc_validation_error_proto_rawDescGZIP() []byte {
	file_path_qos_jsonrpc_validation_error_proto_rawDescOnce.Do(func() {
		file_path_qos_jsonrpc_validation_error_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_path_qos_jsonrpc_validation_error_proto_rawDesc), len(file_path_qos_jsonrpc_validation_error_proto_rawDesc)))
	})
	return file_path_qos_jsonrpc_validation_error_proto_rawDescData
}

var file_path_qos_jsonrpc_validation_error_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_path_qos_jsonrpc_validation_error_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_path_qos_jsonrpc_validation_error_proto_goTypes = []any{
	(JsonRpcValidationErrorType)(0),        // 0: path.qos.JsonRpcValidationErrorType
	(*JsonRpcResponseValidationError)(nil), // 1: path.qos.JsonRpcResponseValidationError
	(*timestamppb.Timestamp)(nil),          // 2: google.protobuf.Timestamp
}
var file_path_qos_jsonrpc_validation_error_proto_depIdxs = []int32{
	0, // 0: path.qos.JsonRpcResponseValidationError.error_type:type_name -> path.qos.JsonRpcValidationErrorType
	2, // 1: path.qos.JsonRpcResponseValidationError.timestamp:type_name -> google.protobuf.Timestamp
	2, // [2:2] is the sub-list for method output_type
	2, // [2:2] is the sub-list for method input_type
	2, // [2:2] is the sub-list for extension type_name
	2, // [2:2] is the sub-list for extension extendee
	0, // [0:2] is the sub-list for field type_name
}

func init() { file_path_qos_jsonrpc_validation_error_proto_init() }
func file_path_qos_jsonrpc_validation_error_proto_init() {
	if File_path_qos_jsonrpc_validation_error_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_path_qos_jsonrpc_validation_error_proto_rawDesc), len(file_path_qos_jsonrpc_validation_error_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_path_qos_jsonrpc_validation_error_proto_goTypes,
		DependencyIndexes: file_path_qos_jsonrpc_validation_error_proto_depIdxs,
		EnumInfos:         file_path_qos_jsonrpc_validation_error_proto_enumTypes,
		MessageInfos:      file_path_qos_jsonrpc_validation_error_proto_msgTypes,
	}.Build()
	File_path_qos_jsonrpc_validation_error_proto = out.File
	file_path_qos_jsonrpc_validation_error_proto_goTypes = nil
	file_path_qos_jsonrpc_validation_error_proto_depIdxs = nil
}
