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

package qos

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	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)
)

// RequestErrorKind enumerates possible request errors.
type RequestErrorKind int32

const (
	RequestErrorKind_REQUEST_ERROR_UNSPECIFIED                                      RequestErrorKind = 0
	RequestErrorKind_REQUEST_ERROR_INTERNAL_READ_HTTP_ERROR                         RequestErrorKind = 1 // Internal error: reading HTTP request's body failed.
	RequestErrorKind_REQUEST_ERROR_INTERNAL_PROTOCOL_ERROR                          RequestErrorKind = 2 // Internal error: protocol error: e.g. no endpoint responses received.
	RequestErrorKind_REQUEST_ERROR_USER_ERROR_JSONRPC_PARSE_ERROR                   RequestErrorKind = 3 // User error: Request failed to parse as JSONRPC.
	RequestErrorKind_REQUEST_ERROR_USER_ERROR_JSONRPC_SERVICE_DETECTION_ERROR       RequestErrorKind = 4 // User error: Failed to detect service type from JSONRPC method.
	RequestErrorKind_REQUEST_ERROR_USER_ERROR_JSONRPC_UNSUPPORTED_RPC_TYPE          RequestErrorKind = 5 // User error: JSONRPC method maps to unsupported RPC type.
	RequestErrorKind_REQUEST_ERROR_INTERNAL_JSONRPC_PAYLOAD_BUILD_ERROR             RequestErrorKind = 6 // Internal error: Failed to build service payload from JSONRPC request.
	RequestErrorKind_REQUEST_ERROR_USER_ERROR_REST_SERVICE_DETECTION_ERROR          RequestErrorKind = 7 // User error: Failed to detect service type from REST request.
	RequestErrorKind_REQUEST_ERROR_USER_ERROR_REST_UNSUPPORTED_RPC_TYPE             RequestErrorKind = 8 // User error: unsupported service type in REST request.
	RequestErrorKind_REQUEST_ERROR_INTERNAL_JSONRPC_BACKEND_SERVICE_UNMARSHAL_ERROR RequestErrorKind = 9 // Internal error: JSONRPC backend service payload failed to unmarshal as valid JSONRPC response.
)

// Enum value maps for RequestErrorKind.
var (
	RequestErrorKind_name = map[int32]string{
		0: "REQUEST_ERROR_UNSPECIFIED",
		1: "REQUEST_ERROR_INTERNAL_READ_HTTP_ERROR",
		2: "REQUEST_ERROR_INTERNAL_PROTOCOL_ERROR",
		3: "REQUEST_ERROR_USER_ERROR_JSONRPC_PARSE_ERROR",
		4: "REQUEST_ERROR_USER_ERROR_JSONRPC_SERVICE_DETECTION_ERROR",
		5: "REQUEST_ERROR_USER_ERROR_JSONRPC_UNSUPPORTED_RPC_TYPE",
		6: "REQUEST_ERROR_INTERNAL_JSONRPC_PAYLOAD_BUILD_ERROR",
		7: "REQUEST_ERROR_USER_ERROR_REST_SERVICE_DETECTION_ERROR",
		8: "REQUEST_ERROR_USER_ERROR_REST_UNSUPPORTED_RPC_TYPE",
		9: "REQUEST_ERROR_INTERNAL_JSONRPC_BACKEND_SERVICE_UNMARSHAL_ERROR",
	}
	RequestErrorKind_value = map[string]int32{
		"REQUEST_ERROR_UNSPECIFIED":                                      0,
		"REQUEST_ERROR_INTERNAL_READ_HTTP_ERROR":                         1,
		"REQUEST_ERROR_INTERNAL_PROTOCOL_ERROR":                          2,
		"REQUEST_ERROR_USER_ERROR_JSONRPC_PARSE_ERROR":                   3,
		"REQUEST_ERROR_USER_ERROR_JSONRPC_SERVICE_DETECTION_ERROR":       4,
		"REQUEST_ERROR_USER_ERROR_JSONRPC_UNSUPPORTED_RPC_TYPE":          5,
		"REQUEST_ERROR_INTERNAL_JSONRPC_PAYLOAD_BUILD_ERROR":             6,
		"REQUEST_ERROR_USER_ERROR_REST_SERVICE_DETECTION_ERROR":          7,
		"REQUEST_ERROR_USER_ERROR_REST_UNSUPPORTED_RPC_TYPE":             8,
		"REQUEST_ERROR_INTERNAL_JSONRPC_BACKEND_SERVICE_UNMARSHAL_ERROR": 9,
	}
)

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

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

func (RequestErrorKind) Descriptor() protoreflect.EnumDescriptor {
	return file_path_qos_request_error_proto_enumTypes[0].Descriptor()
}

func (RequestErrorKind) Type() protoreflect.EnumType {
	return &file_path_qos_request_error_proto_enumTypes[0]
}

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

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

// RequestError tracks the details of a request error.
type RequestError struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Tracks the kind of error: e.g. internal.
	ErrorKind RequestErrorKind `protobuf:"varint,1,opt,name=error_kind,json=errorKind,proto3,enum=path.qos.RequestErrorKind" json:"error_kind,omitempty"`
	// Tracks details of the error.
	ErrorDetails string `protobuf:"bytes,2,opt,name=error_details,json=errorDetails,proto3" json:"error_details,omitempty"`
	// TODO_MVP(@adshm): drop this in favor of JUDGE's solution:
	// store the JSONRPC Response's details (specifically the `code` field).
	// The HTTP status can be derived from the JSONRPC response.
	HttpStatusCode int32 `protobuf:"varint,3,opt,name=http_status_code,json=httpStatusCode,proto3" json:"http_status_code,omitempty"`
	unknownFields  protoimpl.UnknownFields
	sizeCache      protoimpl.SizeCache
}

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

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

func (*RequestError) ProtoMessage() {}

func (x *RequestError) ProtoReflect() protoreflect.Message {
	mi := &file_path_qos_request_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 RequestError.ProtoReflect.Descriptor instead.
func (*RequestError) Descriptor() ([]byte, []int) {
	return file_path_qos_request_error_proto_rawDescGZIP(), []int{0}
}

func (x *RequestError) GetErrorKind() RequestErrorKind {
	if x != nil {
		return x.ErrorKind
	}
	return RequestErrorKind_REQUEST_ERROR_UNSPECIFIED
}

func (x *RequestError) GetErrorDetails() string {
	if x != nil {
		return x.ErrorDetails
	}
	return ""
}

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

var File_path_qos_request_error_proto protoreflect.FileDescriptor

const file_path_qos_request_error_proto_rawDesc = "" +
	"\n" +
	"\x1cpath/qos/request_error.proto\x12\bpath.qos\"\x98\x01\n" +
	"\fRequestError\x129\n" +
	"\n" +
	"error_kind\x18\x01 \x01(\x0e2\x1a.path.qos.RequestErrorKindR\terrorKind\x12#\n" +
	"\rerror_details\x18\x02 \x01(\tR\ferrorDetails\x12(\n" +
	"\x10http_status_code\x18\x03 \x01(\x05R\x0ehttpStatusCode*\xa2\x04\n" +
	"\x10RequestErrorKind\x12\x1d\n" +
	"\x19REQUEST_ERROR_UNSPECIFIED\x10\x00\x12*\n" +
	"&REQUEST_ERROR_INTERNAL_READ_HTTP_ERROR\x10\x01\x12)\n" +
	"%REQUEST_ERROR_INTERNAL_PROTOCOL_ERROR\x10\x02\x120\n" +
	",REQUEST_ERROR_USER_ERROR_JSONRPC_PARSE_ERROR\x10\x03\x12<\n" +
	"8REQUEST_ERROR_USER_ERROR_JSONRPC_SERVICE_DETECTION_ERROR\x10\x04\x129\n" +
	"5REQUEST_ERROR_USER_ERROR_JSONRPC_UNSUPPORTED_RPC_TYPE\x10\x05\x126\n" +
	"2REQUEST_ERROR_INTERNAL_JSONRPC_PAYLOAD_BUILD_ERROR\x10\x06\x129\n" +
	"5REQUEST_ERROR_USER_ERROR_REST_SERVICE_DETECTION_ERROR\x10\a\x126\n" +
	"2REQUEST_ERROR_USER_ERROR_REST_UNSUPPORTED_RPC_TYPE\x10\b\x12B\n" +
	">REQUEST_ERROR_INTERNAL_JSONRPC_BACKEND_SERVICE_UNMARSHAL_ERROR\x10\tB0Z.github.com/buildwithgrove/path/observation/qosb\x06proto3"

var (
	file_path_qos_request_error_proto_rawDescOnce sync.Once
	file_path_qos_request_error_proto_rawDescData []byte
)

func file_path_qos_request_error_proto_rawDescGZIP() []byte {
	file_path_qos_request_error_proto_rawDescOnce.Do(func() {
		file_path_qos_request_error_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_path_qos_request_error_proto_rawDesc), len(file_path_qos_request_error_proto_rawDesc)))
	})
	return file_path_qos_request_error_proto_rawDescData
}

var file_path_qos_request_error_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_path_qos_request_error_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_path_qos_request_error_proto_goTypes = []any{
	(RequestErrorKind)(0), // 0: path.qos.RequestErrorKind
	(*RequestError)(nil),  // 1: path.qos.RequestError
}
var file_path_qos_request_error_proto_depIdxs = []int32{
	0, // 0: path.qos.RequestError.error_kind:type_name -> path.qos.RequestErrorKind
	1, // [1:1] is the sub-list for method output_type
	1, // [1:1] is the sub-list for method input_type
	1, // [1:1] is the sub-list for extension type_name
	1, // [1:1] is the sub-list for extension extendee
	0, // [0:1] is the sub-list for field type_name
}

func init() { file_path_qos_request_error_proto_init() }
func file_path_qos_request_error_proto_init() {
	if File_path_qos_request_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_request_error_proto_rawDesc), len(file_path_qos_request_error_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_path_qos_request_error_proto_goTypes,
		DependencyIndexes: file_path_qos_request_error_proto_depIdxs,
		EnumInfos:         file_path_qos_request_error_proto_enumTypes,
		MessageInfos:      file_path_qos_request_error_proto_msgTypes,
	}.Build()
	File_path_qos_request_error_proto = out.File
	file_path_qos_request_error_proto_goTypes = nil
	file_path_qos_request_error_proto_depIdxs = nil
}
