// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        v5.29.3
// source: path/qos/cosmos_request.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)
)

// BackendServiceType enumerates the types of backend services that can handle requests
type BackendServiceType int32

const (
	BackendServiceType_BACKEND_SERVICE_TYPE_UNSPECIFIED BackendServiceType = 0
	BackendServiceType_BACKEND_SERVICE_TYPE_JSONRPC     BackendServiceType = 1 // Backend service using JSON-RPC protocol
	BackendServiceType_BACKEND_SERVICE_TYPE_REST        BackendServiceType = 2 // Backend service using REST API
	BackendServiceType_BACKEND_SERVICE_TYPE_COMETBFT    BackendServiceType = 3 // Backend service using CometBFT RPC
)

// Enum value maps for BackendServiceType.
var (
	BackendServiceType_name = map[int32]string{
		0: "BACKEND_SERVICE_TYPE_UNSPECIFIED",
		1: "BACKEND_SERVICE_TYPE_JSONRPC",
		2: "BACKEND_SERVICE_TYPE_REST",
		3: "BACKEND_SERVICE_TYPE_COMETBFT",
	}
	BackendServiceType_value = map[string]int32{
		"BACKEND_SERVICE_TYPE_UNSPECIFIED": 0,
		"BACKEND_SERVICE_TYPE_JSONRPC":     1,
		"BACKEND_SERVICE_TYPE_REST":        2,
		"BACKEND_SERVICE_TYPE_COMETBFT":    3,
	}
)

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

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

func (BackendServiceType) Descriptor() protoreflect.EnumDescriptor {
	return file_path_qos_cosmos_request_proto_enumTypes[0].Descriptor()
}

func (BackendServiceType) Type() protoreflect.EnumType {
	return &file_path_qos_cosmos_request_proto_enumTypes[0]
}

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

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

// CosmosRequestProfile contains:
// - Target backend service selection
// - Request format determination (JSONRPC vs REST)
// - Parsed and validated request payload
type CosmosRequestProfile struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Backend service configuration and selection details
	BackendServiceDetails *BackendServiceDetails `protobuf:"bytes,1,opt,name=backend_service_details,json=backendServiceDetails,proto3" json:"backend_service_details,omitempty"`
	// Parsed request payload by format type
	//
	// Types that are valid to be assigned to ParsedRequest:
	//
	//	*CosmosRequestProfile_RestRequest
	//	*CosmosRequestProfile_JsonrpcRequest
	ParsedRequest isCosmosRequestProfile_ParsedRequest `protobuf_oneof:"parsed_request"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*CosmosRequestProfile) ProtoMessage() {}

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

func (x *CosmosRequestProfile) GetBackendServiceDetails() *BackendServiceDetails {
	if x != nil {
		return x.BackendServiceDetails
	}
	return nil
}

func (x *CosmosRequestProfile) GetParsedRequest() isCosmosRequestProfile_ParsedRequest {
	if x != nil {
		return x.ParsedRequest
	}
	return nil
}

func (x *CosmosRequestProfile) GetRestRequest() *RESTRequest {
	if x != nil {
		if x, ok := x.ParsedRequest.(*CosmosRequestProfile_RestRequest); ok {
			return x.RestRequest
		}
	}
	return nil
}

func (x *CosmosRequestProfile) GetJsonrpcRequest() *JsonRpcRequest {
	if x != nil {
		if x, ok := x.ParsedRequest.(*CosmosRequestProfile_JsonrpcRequest); ok {
			return x.JsonrpcRequest
		}
	}
	return nil
}

type isCosmosRequestProfile_ParsedRequest interface {
	isCosmosRequestProfile_ParsedRequest()
}

type CosmosRequestProfile_RestRequest struct {
	RestRequest *RESTRequest `protobuf:"bytes,2,opt,name=rest_request,json=restRequest,proto3,oneof"`
}

type CosmosRequestProfile_JsonrpcRequest struct {
	JsonrpcRequest *JsonRpcRequest `protobuf:"bytes,3,opt,name=jsonrpc_request,json=jsonrpcRequest,proto3,oneof"`
}

func (*CosmosRequestProfile_RestRequest) isCosmosRequestProfile_ParsedRequest() {}

func (*CosmosRequestProfile_JsonrpcRequest) isCosmosRequestProfile_ParsedRequest() {}

// BackendServiceDetails contains metadata about backend service selection
type BackendServiceDetails struct {
	state              protoimpl.MessageState `protogen:"open.v1"`
	BackendServiceType BackendServiceType     `protobuf:"varint,1,opt,name=backend_service_type,json=backendServiceType,proto3,enum=path.qos.BackendServiceType" json:"backend_service_type,omitempty"`
	SelectionReason    string                 `protobuf:"bytes,2,opt,name=selection_reason,json=selectionReason,proto3" json:"selection_reason,omitempty"`
	unknownFields      protoimpl.UnknownFields
	sizeCache          protoimpl.SizeCache
}

func (x *BackendServiceDetails) Reset() {
	*x = BackendServiceDetails{}
	mi := &file_path_qos_cosmos_request_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*BackendServiceDetails) ProtoMessage() {}

func (x *BackendServiceDetails) ProtoReflect() protoreflect.Message {
	mi := &file_path_qos_cosmos_request_proto_msgTypes[1]
	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 BackendServiceDetails.ProtoReflect.Descriptor instead.
func (*BackendServiceDetails) Descriptor() ([]byte, []int) {
	return file_path_qos_cosmos_request_proto_rawDescGZIP(), []int{1}
}

func (x *BackendServiceDetails) GetBackendServiceType() BackendServiceType {
	if x != nil {
		return x.BackendServiceType
	}
	return BackendServiceType_BACKEND_SERVICE_TYPE_UNSPECIFIED
}

func (x *BackendServiceDetails) GetSelectionReason() string {
	if x != nil {
		return x.SelectionReason
	}
	return ""
}

// RESTRequest contains details about a REST request
type RESTRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// API path that was called (e.g. "/", "/health", "/status")
	ApiPath string `protobuf:"bytes,1,opt,name=api_path,json=apiPath,proto3" json:"api_path,omitempty"`
	// HTTP method used (GET, POST, etc.)
	HttpMethod string `protobuf:"bytes,2,opt,name=http_method,json=httpMethod,proto3" json:"http_method,omitempty"`
	// Tracks the value of HTTP request's Content-Type header.
	ContentType string `protobuf:"bytes,3,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
	// Length of request payload: could be 0, e.g. for GET requests.
	PayloadLength uint32 `protobuf:"varint,4,opt,name=payload_length,json=payloadLength,proto3" json:"payload_length,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *RESTRequest) Reset() {
	*x = RESTRequest{}
	mi := &file_path_qos_cosmos_request_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*RESTRequest) ProtoMessage() {}

func (x *RESTRequest) ProtoReflect() protoreflect.Message {
	mi := &file_path_qos_cosmos_request_proto_msgTypes[2]
	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 RESTRequest.ProtoReflect.Descriptor instead.
func (*RESTRequest) Descriptor() ([]byte, []int) {
	return file_path_qos_cosmos_request_proto_rawDescGZIP(), []int{2}
}

func (x *RESTRequest) GetApiPath() string {
	if x != nil {
		return x.ApiPath
	}
	return ""
}

func (x *RESTRequest) GetHttpMethod() string {
	if x != nil {
		return x.HttpMethod
	}
	return ""
}

func (x *RESTRequest) GetContentType() string {
	if x != nil {
		return x.ContentType
	}
	return ""
}

func (x *RESTRequest) GetPayloadLength() uint32 {
	if x != nil {
		return x.PayloadLength
	}
	return 0
}

var File_path_qos_cosmos_request_proto protoreflect.FileDescriptor

const file_path_qos_cosmos_request_proto_rawDesc = "" +
	"\n" +
	"\x1dpath/qos/cosmos_request.proto\x12\bpath.qos\x1a\x16path/qos/jsonrpc.proto\"\x82\x02\n" +
	"\x14CosmosRequestProfile\x12W\n" +
	"\x17backend_service_details\x18\x01 \x01(\v2\x1f.path.qos.BackendServiceDetailsR\x15backendServiceDetails\x12:\n" +
	"\frest_request\x18\x02 \x01(\v2\x15.path.qos.RESTRequestH\x00R\vrestRequest\x12C\n" +
	"\x0fjsonrpc_request\x18\x03 \x01(\v2\x18.path.qos.JsonRpcRequestH\x00R\x0ejsonrpcRequestB\x10\n" +
	"\x0eparsed_request\"\x92\x01\n" +
	"\x15BackendServiceDetails\x12N\n" +
	"\x14backend_service_type\x18\x01 \x01(\x0e2\x1c.path.qos.BackendServiceTypeR\x12backendServiceType\x12)\n" +
	"\x10selection_reason\x18\x02 \x01(\tR\x0fselectionReason\"\x93\x01\n" +
	"\vRESTRequest\x12\x19\n" +
	"\bapi_path\x18\x01 \x01(\tR\aapiPath\x12\x1f\n" +
	"\vhttp_method\x18\x02 \x01(\tR\n" +
	"httpMethod\x12!\n" +
	"\fcontent_type\x18\x03 \x01(\tR\vcontentType\x12%\n" +
	"\x0epayload_length\x18\x04 \x01(\rR\rpayloadLength*\x9e\x01\n" +
	"\x12BackendServiceType\x12$\n" +
	" BACKEND_SERVICE_TYPE_UNSPECIFIED\x10\x00\x12 \n" +
	"\x1cBACKEND_SERVICE_TYPE_JSONRPC\x10\x01\x12\x1d\n" +
	"\x19BACKEND_SERVICE_TYPE_REST\x10\x02\x12!\n" +
	"\x1dBACKEND_SERVICE_TYPE_COMETBFT\x10\x03B0Z.github.com/buildwithgrove/path/observation/qosb\x06proto3"

var (
	file_path_qos_cosmos_request_proto_rawDescOnce sync.Once
	file_path_qos_cosmos_request_proto_rawDescData []byte
)

func file_path_qos_cosmos_request_proto_rawDescGZIP() []byte {
	file_path_qos_cosmos_request_proto_rawDescOnce.Do(func() {
		file_path_qos_cosmos_request_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_path_qos_cosmos_request_proto_rawDesc), len(file_path_qos_cosmos_request_proto_rawDesc)))
	})
	return file_path_qos_cosmos_request_proto_rawDescData
}

var file_path_qos_cosmos_request_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_path_qos_cosmos_request_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_path_qos_cosmos_request_proto_goTypes = []any{
	(BackendServiceType)(0),       // 0: path.qos.BackendServiceType
	(*CosmosRequestProfile)(nil),  // 1: path.qos.CosmosRequestProfile
	(*BackendServiceDetails)(nil), // 2: path.qos.BackendServiceDetails
	(*RESTRequest)(nil),           // 3: path.qos.RESTRequest
	(*JsonRpcRequest)(nil),        // 4: path.qos.JsonRpcRequest
}
var file_path_qos_cosmos_request_proto_depIdxs = []int32{
	2, // 0: path.qos.CosmosRequestProfile.backend_service_details:type_name -> path.qos.BackendServiceDetails
	3, // 1: path.qos.CosmosRequestProfile.rest_request:type_name -> path.qos.RESTRequest
	4, // 2: path.qos.CosmosRequestProfile.jsonrpc_request:type_name -> path.qos.JsonRpcRequest
	0, // 3: path.qos.BackendServiceDetails.backend_service_type:type_name -> path.qos.BackendServiceType
	4, // [4:4] is the sub-list for method output_type
	4, // [4:4] is the sub-list for method input_type
	4, // [4:4] is the sub-list for extension type_name
	4, // [4:4] is the sub-list for extension extendee
	0, // [0:4] is the sub-list for field type_name
}

func init() { file_path_qos_cosmos_request_proto_init() }
func file_path_qos_cosmos_request_proto_init() {
	if File_path_qos_cosmos_request_proto != nil {
		return
	}
	file_path_qos_jsonrpc_proto_init()
	file_path_qos_cosmos_request_proto_msgTypes[0].OneofWrappers = []any{
		(*CosmosRequestProfile_RestRequest)(nil),
		(*CosmosRequestProfile_JsonrpcRequest)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_path_qos_cosmos_request_proto_rawDesc), len(file_path_qos_cosmos_request_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   3,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_path_qos_cosmos_request_proto_goTypes,
		DependencyIndexes: file_path_qos_cosmos_request_proto_depIdxs,
		EnumInfos:         file_path_qos_cosmos_request_proto_enumTypes,
		MessageInfos:      file_path_qos_cosmos_request_proto_msgTypes,
	}.Build()
	File_path_qos_cosmos_request_proto = out.File
	file_path_qos_cosmos_request_proto_goTypes = nil
	file_path_qos_cosmos_request_proto_depIdxs = nil
}
