// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        v5.29.3
// source: pkg/transport/grpc/transport.proto

package grpc

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

// Message type
type StreamMessage_MessageType int32

const (
	StreamMessage_DATA    StreamMessage_MessageType = 0 // Raw data message
	StreamMessage_CONTROL StreamMessage_MessageType = 2 // Control message
)

// Enum value maps for StreamMessage_MessageType.
var (
	StreamMessage_MessageType_name = map[int32]string{
		0: "DATA",
		2: "CONTROL",
	}
	StreamMessage_MessageType_value = map[string]int32{
		"DATA":    0,
		"CONTROL": 2,
	}
)

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

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

func (StreamMessage_MessageType) Descriptor() protoreflect.EnumDescriptor {
	return file_pkg_transport_grpc_transport_proto_enumTypes[0].Descriptor()
}

func (StreamMessage_MessageType) Type() protoreflect.EnumType {
	return &file_pkg_transport_grpc_transport_proto_enumTypes[0]
}

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

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

// StreamMessage represents a message in the bidirectional stream
type StreamMessage struct {
	state    protoimpl.MessageState    `protogen:"open.v1"`
	Type     StreamMessage_MessageType `protobuf:"varint,1,opt,name=type,proto3,enum=transport.StreamMessage_MessageType" json:"type,omitempty"`
	Data     []byte                    `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	ClientId string                    `protobuf:"bytes,3,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	GroupId  string                    `protobuf:"bytes,4,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	// Optional metadata
	Metadata      map[string]string `protobuf:"bytes,5,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*StreamMessage) ProtoMessage() {}

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

func (x *StreamMessage) GetType() StreamMessage_MessageType {
	if x != nil {
		return x.Type
	}
	return StreamMessage_DATA
}

func (x *StreamMessage) GetData() []byte {
	if x != nil {
		return x.Data
	}
	return nil
}

func (x *StreamMessage) GetClientId() string {
	if x != nil {
		return x.ClientId
	}
	return ""
}

func (x *StreamMessage) GetGroupId() string {
	if x != nil {
		return x.GroupId
	}
	return ""
}

func (x *StreamMessage) GetMetadata() map[string]string {
	if x != nil {
		return x.Metadata
	}
	return nil
}

// ClientInfo contains client identification
type ClientInfo struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	ClientId      string                 `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	GroupId       string                 `protobuf:"bytes,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	Username      string                 `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
	Password      string                 `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ClientInfo) ProtoMessage() {}

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

func (x *ClientInfo) GetClientId() string {
	if x != nil {
		return x.ClientId
	}
	return ""
}

func (x *ClientInfo) GetGroupId() string {
	if x != nil {
		return x.GroupId
	}
	return ""
}

func (x *ClientInfo) GetUsername() string {
	if x != nil {
		return x.Username
	}
	return ""
}

func (x *ClientInfo) GetPassword() string {
	if x != nil {
		return x.Password
	}
	return ""
}

var File_pkg_transport_grpc_transport_proto protoreflect.FileDescriptor

const file_pkg_transport_grpc_transport_proto_rawDesc = "" +
	"\n" +
	"\"pkg/transport/grpc/transport.proto\x12\ttransport\"\xbc\x02\n" +
	"\rStreamMessage\x128\n" +
	"\x04type\x18\x01 \x01(\x0e2$.transport.StreamMessage.MessageTypeR\x04type\x12\x12\n" +
	"\x04data\x18\x02 \x01(\fR\x04data\x12\x1b\n" +
	"\tclient_id\x18\x03 \x01(\tR\bclientId\x12\x19\n" +
	"\bgroup_id\x18\x04 \x01(\tR\agroupId\x12B\n" +
	"\bmetadata\x18\x05 \x03(\v2&.transport.StreamMessage.MetadataEntryR\bmetadata\x1a;\n" +
	"\rMetadataEntry\x12\x10\n" +
	"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
	"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"$\n" +
	"\vMessageType\x12\b\n" +
	"\x04DATA\x10\x00\x12\v\n" +
	"\aCONTROL\x10\x02\"|\n" +
	"\n" +
	"ClientInfo\x12\x1b\n" +
	"\tclient_id\x18\x01 \x01(\tR\bclientId\x12\x19\n" +
	"\bgroup_id\x18\x02 \x01(\tR\agroupId\x12\x1a\n" +
	"\busername\x18\x03 \x01(\tR\busername\x12\x1a\n" +
	"\bpassword\x18\x04 \x01(\tR\bpassword2V\n" +
	"\x10TransportService\x12B\n" +
	"\bBiStream\x12\x18.transport.StreamMessage\x1a\x18.transport.StreamMessage(\x010\x01B1Z/github.com/buhuipao/anyproxy/pkg/transport/grpcb\x06proto3"

var (
	file_pkg_transport_grpc_transport_proto_rawDescOnce sync.Once
	file_pkg_transport_grpc_transport_proto_rawDescData []byte
)

func file_pkg_transport_grpc_transport_proto_rawDescGZIP() []byte {
	file_pkg_transport_grpc_transport_proto_rawDescOnce.Do(func() {
		file_pkg_transport_grpc_transport_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_pkg_transport_grpc_transport_proto_rawDesc), len(file_pkg_transport_grpc_transport_proto_rawDesc)))
	})
	return file_pkg_transport_grpc_transport_proto_rawDescData
}

var file_pkg_transport_grpc_transport_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_pkg_transport_grpc_transport_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_pkg_transport_grpc_transport_proto_goTypes = []any{
	(StreamMessage_MessageType)(0), // 0: transport.StreamMessage.MessageType
	(*StreamMessage)(nil),          // 1: transport.StreamMessage
	(*ClientInfo)(nil),             // 2: transport.ClientInfo
	nil,                            // 3: transport.StreamMessage.MetadataEntry
}
var file_pkg_transport_grpc_transport_proto_depIdxs = []int32{
	0, // 0: transport.StreamMessage.type:type_name -> transport.StreamMessage.MessageType
	3, // 1: transport.StreamMessage.metadata:type_name -> transport.StreamMessage.MetadataEntry
	1, // 2: transport.TransportService.BiStream:input_type -> transport.StreamMessage
	1, // 3: transport.TransportService.BiStream:output_type -> transport.StreamMessage
	3, // [3:4] is the sub-list for method output_type
	2, // [2:3] 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_pkg_transport_grpc_transport_proto_init() }
func file_pkg_transport_grpc_transport_proto_init() {
	if File_pkg_transport_grpc_transport_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_pkg_transport_grpc_transport_proto_rawDesc), len(file_pkg_transport_grpc_transport_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   3,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_pkg_transport_grpc_transport_proto_goTypes,
		DependencyIndexes: file_pkg_transport_grpc_transport_proto_depIdxs,
		EnumInfos:         file_pkg_transport_grpc_transport_proto_enumTypes,
		MessageInfos:      file_pkg_transport_grpc_transport_proto_msgTypes,
	}.Build()
	File_pkg_transport_grpc_transport_proto = out.File
	file_pkg_transport_grpc_transport_proto_goTypes = nil
	file_pkg_transport_grpc_transport_proto_depIdxs = nil
}
