// Copyright 2013 <chaishushan{AT}gmail.com>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        v6.31.0
// source: wire.proto

//
//	protorpc wire format wrapper
//
//	0. Frame Format
//	len : uvarint64
//	data: byte[len]
//
//	1. Client Send Request
//	Send RequestHeader: sendFrame(zsock, hdr, len(hdr))
//	Send Request: sendFrame(zsock, body, hdr.snappy_compressed_request_len)
//
//	2. Server Recv Request
//	Recv RequestHeader: recvFrame(zsock, hdr, max_hdr_len, 0)
//	Recv Request: recvFrame(zsock, body, hdr.snappy_compressed_request_len, 0)
//
//	3. Server Send Response
//	Send ResponseHeader: sendFrame(zsock, hdr, len(hdr))
//	Send Response: sendFrame(zsock, body, hdr.snappy_compressed_response_len)
//
//	4. Client Recv Response
//	Recv ResponseHeader: recvFrame(zsock, hdr, max_hdr_len, 0)
//	Recv Response: recvFrame(zsock, body, hdr.snappy_compressed_response_len, 0)
//

package protorpc_wire

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

type Const int32

const (
	Const_ZERO                   Const = 0
	Const_MAX_REQUEST_HEADER_LEN Const = 1024
)

// Enum value maps for Const.
var (
	Const_name = map[int32]string{
		0:    "ZERO",
		1024: "MAX_REQUEST_HEADER_LEN",
	}
	Const_value = map[string]int32{
		"ZERO":                   0,
		"MAX_REQUEST_HEADER_LEN": 1024,
	}
)

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

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

func (Const) Descriptor() protoreflect.EnumDescriptor {
	return file_wire_proto_enumTypes[0].Descriptor()
}

func (Const) Type() protoreflect.EnumType {
	return &file_wire_proto_enumTypes[0]
}

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

// Deprecated: Do not use.
func (x *Const) UnmarshalJSON(b []byte) error {
	num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
	if err != nil {
		return err
	}
	*x = Const(num)
	return nil
}

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

type RequestHeader struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Id            *uint64                `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
	Method        *string                `protobuf:"bytes,2,req,name=method" json:"method,omitempty"`
	RawRequestLen *uint32                `protobuf:"varint,3,req,name=raw_request_len,json=rawRequestLen" json:"raw_request_len,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*RequestHeader) ProtoMessage() {}

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

func (x *RequestHeader) GetId() uint64 {
	if x != nil && x.Id != nil {
		return *x.Id
	}
	return 0
}

func (x *RequestHeader) GetMethod() string {
	if x != nil && x.Method != nil {
		return *x.Method
	}
	return ""
}

func (x *RequestHeader) GetRawRequestLen() uint32 {
	if x != nil && x.RawRequestLen != nil {
		return *x.RawRequestLen
	}
	return 0
}

type ResponseHeader struct {
	state          protoimpl.MessageState `protogen:"open.v1"`
	Id             *uint64                `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
	Error          *string                `protobuf:"bytes,2,req,name=error" json:"error,omitempty"`
	RawResponseLen *uint32                `protobuf:"varint,3,req,name=raw_response_len,json=rawResponseLen" json:"raw_response_len,omitempty"`
	unknownFields  protoimpl.UnknownFields
	sizeCache      protoimpl.SizeCache
}

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

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

func (*ResponseHeader) ProtoMessage() {}

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

func (x *ResponseHeader) GetId() uint64 {
	if x != nil && x.Id != nil {
		return *x.Id
	}
	return 0
}

func (x *ResponseHeader) GetError() string {
	if x != nil && x.Error != nil {
		return *x.Error
	}
	return ""
}

func (x *ResponseHeader) GetRawResponseLen() uint32 {
	if x != nil && x.RawResponseLen != nil {
		return *x.RawResponseLen
	}
	return 0
}

var File_wire_proto protoreflect.FileDescriptor

const file_wire_proto_rawDesc = "" +
	"\n" +
	"\n" +
	"wire.proto\x12\rprotorpc.wire\"_\n" +
	"\rRequestHeader\x12\x0e\n" +
	"\x02id\x18\x01 \x02(\x04R\x02id\x12\x16\n" +
	"\x06method\x18\x02 \x02(\tR\x06method\x12&\n" +
	"\x0fraw_request_len\x18\x03 \x02(\rR\rrawRequestLen\"`\n" +
	"\x0eResponseHeader\x12\x0e\n" +
	"\x02id\x18\x01 \x02(\x04R\x02id\x12\x14\n" +
	"\x05error\x18\x02 \x02(\tR\x05error\x12(\n" +
	"\x10raw_response_len\x18\x03 \x02(\rR\x0erawResponseLen*.\n" +
	"\x05Const\x12\b\n" +
	"\x04ZERO\x10\x00\x12\x1b\n" +
	"\x16MAX_REQUEST_HEADER_LEN\x10\x80\bB\x0fZ\rprotorpc.wire"

var (
	file_wire_proto_rawDescOnce sync.Once
	file_wire_proto_rawDescData []byte
)

func file_wire_proto_rawDescGZIP() []byte {
	file_wire_proto_rawDescOnce.Do(func() {
		file_wire_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_wire_proto_rawDesc), len(file_wire_proto_rawDesc)))
	})
	return file_wire_proto_rawDescData
}

var file_wire_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_wire_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_wire_proto_goTypes = []any{
	(Const)(0),             // 0: protorpc.wire.Const
	(*RequestHeader)(nil),  // 1: protorpc.wire.RequestHeader
	(*ResponseHeader)(nil), // 2: protorpc.wire.ResponseHeader
}
var file_wire_proto_depIdxs = []int32{
	0, // [0:0] is the sub-list for method output_type
	0, // [0:0] is the sub-list for method input_type
	0, // [0:0] is the sub-list for extension type_name
	0, // [0:0] is the sub-list for extension extendee
	0, // [0:0] is the sub-list for field type_name
}

func init() { file_wire_proto_init() }
func file_wire_proto_init() {
	if File_wire_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_wire_proto_rawDesc), len(file_wire_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_wire_proto_goTypes,
		DependencyIndexes: file_wire_proto_depIdxs,
		EnumInfos:         file_wire_proto_enumTypes,
		MessageInfos:      file_wire_proto_msgTypes,
	}.Build()
	File_wire_proto = out.File
	file_wire_proto_goTypes = nil
	file_wire_proto_depIdxs = nil
}
