// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        (unknown)
// source: mesh.proto

package proto

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

// MeshMessage is the top-level message for all relay-to-relay communication.
type MeshMessage struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Types that are valid to be assigned to Type:
	//
	//	*MeshMessage_StateUpdate
	//	*MeshMessage_Ack
	//	*MeshMessage_RetransmissionRequest
	//	*MeshMessage_Retransmission
	//	*MeshMessage_Heartbeat
	//	*MeshMessage_SuspectRelay
	//	*MeshMessage_Disconnect
	//	*MeshMessage_ForwardSdp
	//	*MeshMessage_ForwardIce
	//	*MeshMessage_ForwardIngest
	//	*MeshMessage_StreamRequest
	//	*MeshMessage_Handshake
	//	*MeshMessage_HandshakeResponse
	Type          isMeshMessage_Type `protobuf_oneof:"type"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*MeshMessage) ProtoMessage() {}

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

func (x *MeshMessage) GetType() isMeshMessage_Type {
	if x != nil {
		return x.Type
	}
	return nil
}

func (x *MeshMessage) GetStateUpdate() *StateUpdate {
	if x != nil {
		if x, ok := x.Type.(*MeshMessage_StateUpdate); ok {
			return x.StateUpdate
		}
	}
	return nil
}

func (x *MeshMessage) GetAck() *Ack {
	if x != nil {
		if x, ok := x.Type.(*MeshMessage_Ack); ok {
			return x.Ack
		}
	}
	return nil
}

func (x *MeshMessage) GetRetransmissionRequest() *RetransmissionRequest {
	if x != nil {
		if x, ok := x.Type.(*MeshMessage_RetransmissionRequest); ok {
			return x.RetransmissionRequest
		}
	}
	return nil
}

func (x *MeshMessage) GetRetransmission() *Retransmission {
	if x != nil {
		if x, ok := x.Type.(*MeshMessage_Retransmission); ok {
			return x.Retransmission
		}
	}
	return nil
}

func (x *MeshMessage) GetHeartbeat() *Heartbeat {
	if x != nil {
		if x, ok := x.Type.(*MeshMessage_Heartbeat); ok {
			return x.Heartbeat
		}
	}
	return nil
}

func (x *MeshMessage) GetSuspectRelay() *SuspectRelay {
	if x != nil {
		if x, ok := x.Type.(*MeshMessage_SuspectRelay); ok {
			return x.SuspectRelay
		}
	}
	return nil
}

func (x *MeshMessage) GetDisconnect() *Disconnect {
	if x != nil {
		if x, ok := x.Type.(*MeshMessage_Disconnect); ok {
			return x.Disconnect
		}
	}
	return nil
}

func (x *MeshMessage) GetForwardSdp() *ForwardSDP {
	if x != nil {
		if x, ok := x.Type.(*MeshMessage_ForwardSdp); ok {
			return x.ForwardSdp
		}
	}
	return nil
}

func (x *MeshMessage) GetForwardIce() *ForwardICE {
	if x != nil {
		if x, ok := x.Type.(*MeshMessage_ForwardIce); ok {
			return x.ForwardIce
		}
	}
	return nil
}

func (x *MeshMessage) GetForwardIngest() *ForwardIngest {
	if x != nil {
		if x, ok := x.Type.(*MeshMessage_ForwardIngest); ok {
			return x.ForwardIngest
		}
	}
	return nil
}

func (x *MeshMessage) GetStreamRequest() *StreamRequest {
	if x != nil {
		if x, ok := x.Type.(*MeshMessage_StreamRequest); ok {
			return x.StreamRequest
		}
	}
	return nil
}

func (x *MeshMessage) GetHandshake() *Handshake {
	if x != nil {
		if x, ok := x.Type.(*MeshMessage_Handshake); ok {
			return x.Handshake
		}
	}
	return nil
}

func (x *MeshMessage) GetHandshakeResponse() *HandshakeResponse {
	if x != nil {
		if x, ok := x.Type.(*MeshMessage_HandshakeResponse); ok {
			return x.HandshakeResponse
		}
	}
	return nil
}

type isMeshMessage_Type interface {
	isMeshMessage_Type()
}

type MeshMessage_StateUpdate struct {
	// Level 0
	StateUpdate *StateUpdate `protobuf:"bytes,1,opt,name=state_update,json=stateUpdate,proto3,oneof"`
}

type MeshMessage_Ack struct {
	Ack *Ack `protobuf:"bytes,2,opt,name=ack,proto3,oneof"`
}

type MeshMessage_RetransmissionRequest struct {
	RetransmissionRequest *RetransmissionRequest `protobuf:"bytes,3,opt,name=retransmission_request,json=retransmissionRequest,proto3,oneof"`
}

type MeshMessage_Retransmission struct {
	Retransmission *Retransmission `protobuf:"bytes,4,opt,name=retransmission,proto3,oneof"`
}

type MeshMessage_Heartbeat struct {
	Heartbeat *Heartbeat `protobuf:"bytes,5,opt,name=heartbeat,proto3,oneof"`
}

type MeshMessage_SuspectRelay struct {
	SuspectRelay *SuspectRelay `protobuf:"bytes,6,opt,name=suspect_relay,json=suspectRelay,proto3,oneof"`
}

type MeshMessage_Disconnect struct {
	Disconnect *Disconnect `protobuf:"bytes,7,opt,name=disconnect,proto3,oneof"`
}

type MeshMessage_ForwardSdp struct {
	// Level 1
	ForwardSdp *ForwardSDP `protobuf:"bytes,8,opt,name=forward_sdp,json=forwardSdp,proto3,oneof"`
}

type MeshMessage_ForwardIce struct {
	ForwardIce *ForwardICE `protobuf:"bytes,9,opt,name=forward_ice,json=forwardIce,proto3,oneof"`
}

type MeshMessage_ForwardIngest struct {
	ForwardIngest *ForwardIngest `protobuf:"bytes,10,opt,name=forward_ingest,json=forwardIngest,proto3,oneof"`
}

type MeshMessage_StreamRequest struct {
	StreamRequest *StreamRequest `protobuf:"bytes,11,opt,name=stream_request,json=streamRequest,proto3,oneof"`
}

type MeshMessage_Handshake struct {
	// Level 2
	Handshake *Handshake `protobuf:"bytes,12,opt,name=handshake,proto3,oneof"`
}

type MeshMessage_HandshakeResponse struct {
	HandshakeResponse *HandshakeResponse `protobuf:"bytes,13,opt,name=handshake_response,json=handshakeResponse,proto3,oneof"`
}

func (*MeshMessage_StateUpdate) isMeshMessage_Type() {}

func (*MeshMessage_Ack) isMeshMessage_Type() {}

func (*MeshMessage_RetransmissionRequest) isMeshMessage_Type() {}

func (*MeshMessage_Retransmission) isMeshMessage_Type() {}

func (*MeshMessage_Heartbeat) isMeshMessage_Type() {}

func (*MeshMessage_SuspectRelay) isMeshMessage_Type() {}

func (*MeshMessage_Disconnect) isMeshMessage_Type() {}

func (*MeshMessage_ForwardSdp) isMeshMessage_Type() {}

func (*MeshMessage_ForwardIce) isMeshMessage_Type() {}

func (*MeshMessage_ForwardIngest) isMeshMessage_Type() {}

func (*MeshMessage_StreamRequest) isMeshMessage_Type() {}

func (*MeshMessage_Handshake) isMeshMessage_Type() {}

func (*MeshMessage_HandshakeResponse) isMeshMessage_Type() {}

// Handshake to inititiate new connection to mesh.
type Handshake struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	RelayId       string                 `protobuf:"bytes,1,opt,name=relay_id,json=relayId,proto3" json:"relay_id,omitempty"`               // UUID of the relay
	DhPublicKey   string                 `protobuf:"bytes,2,opt,name=dh_public_key,json=dhPublicKey,proto3" json:"dh_public_key,omitempty"` // base64 encoded Diffie-Hellman public key
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Handshake) ProtoMessage() {}

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

func (x *Handshake) GetRelayId() string {
	if x != nil {
		return x.RelayId
	}
	return ""
}

func (x *Handshake) GetDhPublicKey() string {
	if x != nil {
		return x.DhPublicKey
	}
	return ""
}

// HandshakeResponse to respond to a mesh joiner.
type HandshakeResponse struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	RelayId       string                 `protobuf:"bytes,1,opt,name=relay_id,json=relayId,proto3" json:"relay_id,omitempty"`
	DhPublicKey   string                 `protobuf:"bytes,2,opt,name=dh_public_key,json=dhPublicKey,proto3" json:"dh_public_key,omitempty"`
	Approvals     map[string]string      `protobuf:"bytes,3,rep,name=approvals,proto3" json:"approvals,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // relay id to signature
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*HandshakeResponse) ProtoMessage() {}

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

func (x *HandshakeResponse) GetRelayId() string {
	if x != nil {
		return x.RelayId
	}
	return ""
}

func (x *HandshakeResponse) GetDhPublicKey() string {
	if x != nil {
		return x.DhPublicKey
	}
	return ""
}

func (x *HandshakeResponse) GetApprovals() map[string]string {
	if x != nil {
		return x.Approvals
	}
	return nil
}

// Forwarded SDP from another relay.
type ForwardSDP struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	RoomName      string                 `protobuf:"bytes,1,opt,name=room_name,json=roomName,proto3" json:"room_name,omitempty"`
	ParticipantId string                 `protobuf:"bytes,2,opt,name=participant_id,json=participantId,proto3" json:"participant_id,omitempty"`
	Sdp           string                 `protobuf:"bytes,3,opt,name=sdp,proto3" json:"sdp,omitempty"`
	Type          string                 `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` // "offer" or "answer"
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *ForwardSDP) Reset() {
	*x = ForwardSDP{}
	mi := &file_mesh_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*ForwardSDP) ProtoMessage() {}

func (x *ForwardSDP) ProtoReflect() protoreflect.Message {
	mi := &file_mesh_proto_msgTypes[3]
	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 ForwardSDP.ProtoReflect.Descriptor instead.
func (*ForwardSDP) Descriptor() ([]byte, []int) {
	return file_mesh_proto_rawDescGZIP(), []int{3}
}

func (x *ForwardSDP) GetRoomName() string {
	if x != nil {
		return x.RoomName
	}
	return ""
}

func (x *ForwardSDP) GetParticipantId() string {
	if x != nil {
		return x.ParticipantId
	}
	return ""
}

func (x *ForwardSDP) GetSdp() string {
	if x != nil {
		return x.Sdp
	}
	return ""
}

func (x *ForwardSDP) GetType() string {
	if x != nil {
		return x.Type
	}
	return ""
}

// Forwarded ICE candidate from another relay.
type ForwardICE struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	RoomName      string                 `protobuf:"bytes,1,opt,name=room_name,json=roomName,proto3" json:"room_name,omitempty"`
	ParticipantId string                 `protobuf:"bytes,2,opt,name=participant_id,json=participantId,proto3" json:"participant_id,omitempty"`
	Candidate     *ICECandidateInit      `protobuf:"bytes,3,opt,name=candidate,proto3" json:"candidate,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *ForwardICE) Reset() {
	*x = ForwardICE{}
	mi := &file_mesh_proto_msgTypes[4]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*ForwardICE) ProtoMessage() {}

func (x *ForwardICE) ProtoReflect() protoreflect.Message {
	mi := &file_mesh_proto_msgTypes[4]
	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 ForwardICE.ProtoReflect.Descriptor instead.
func (*ForwardICE) Descriptor() ([]byte, []int) {
	return file_mesh_proto_rawDescGZIP(), []int{4}
}

func (x *ForwardICE) GetRoomName() string {
	if x != nil {
		return x.RoomName
	}
	return ""
}

func (x *ForwardICE) GetParticipantId() string {
	if x != nil {
		return x.ParticipantId
	}
	return ""
}

func (x *ForwardICE) GetCandidate() *ICECandidateInit {
	if x != nil {
		return x.Candidate
	}
	return nil
}

// Forwarded ingest room from another relay.
type ForwardIngest struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	RoomName      string                 `protobuf:"bytes,1,opt,name=room_name,json=roomName,proto3" json:"room_name,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *ForwardIngest) Reset() {
	*x = ForwardIngest{}
	mi := &file_mesh_proto_msgTypes[5]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*ForwardIngest) ProtoMessage() {}

func (x *ForwardIngest) ProtoReflect() protoreflect.Message {
	mi := &file_mesh_proto_msgTypes[5]
	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 ForwardIngest.ProtoReflect.Descriptor instead.
func (*ForwardIngest) Descriptor() ([]byte, []int) {
	return file_mesh_proto_rawDescGZIP(), []int{5}
}

func (x *ForwardIngest) GetRoomName() string {
	if x != nil {
		return x.RoomName
	}
	return ""
}

// Stream request from mesh.
type StreamRequest struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	RoomName      string                 `protobuf:"bytes,1,opt,name=room_name,json=roomName,proto3" json:"room_name,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *StreamRequest) Reset() {
	*x = StreamRequest{}
	mi := &file_mesh_proto_msgTypes[6]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*StreamRequest) ProtoMessage() {}

func (x *StreamRequest) ProtoReflect() protoreflect.Message {
	mi := &file_mesh_proto_msgTypes[6]
	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 StreamRequest.ProtoReflect.Descriptor instead.
func (*StreamRequest) Descriptor() ([]byte, []int) {
	return file_mesh_proto_rawDescGZIP(), []int{6}
}

func (x *StreamRequest) GetRoomName() string {
	if x != nil {
		return x.RoomName
	}
	return ""
}

// StateUpdate propagates entity state changes across the mesh.
type StateUpdate struct {
	state          protoimpl.MessageState  `protogen:"open.v1"`
	SequenceNumber uint64                  `protobuf:"varint,1,opt,name=sequence_number,json=sequenceNumber,proto3" json:"sequence_number,omitempty"`                                        // Unique sequence number for this update
	Entities       map[string]*EntityState `protobuf:"bytes,2,rep,name=entities,proto3" json:"entities,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Key: entity_id (e.g., room name), Value: EntityState
	unknownFields  protoimpl.UnknownFields
	sizeCache      protoimpl.SizeCache
}

func (x *StateUpdate) Reset() {
	*x = StateUpdate{}
	mi := &file_mesh_proto_msgTypes[7]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*StateUpdate) ProtoMessage() {}

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

func (x *StateUpdate) GetSequenceNumber() uint64 {
	if x != nil {
		return x.SequenceNumber
	}
	return 0
}

func (x *StateUpdate) GetEntities() map[string]*EntityState {
	if x != nil {
		return x.Entities
	}
	return nil
}

// Ack acknowledges receipt of a StateUpdate.
type Ack struct {
	state          protoimpl.MessageState `protogen:"open.v1"`
	RelayId        string                 `protobuf:"bytes,1,opt,name=relay_id,json=relayId,proto3" json:"relay_id,omitempty"`                       // UUID of the acknowledging relay
	SequenceNumber uint64                 `protobuf:"varint,2,opt,name=sequence_number,json=sequenceNumber,proto3" json:"sequence_number,omitempty"` // Sequence number being acknowledged
	unknownFields  protoimpl.UnknownFields
	sizeCache      protoimpl.SizeCache
}

func (x *Ack) Reset() {
	*x = Ack{}
	mi := &file_mesh_proto_msgTypes[8]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*Ack) ProtoMessage() {}

func (x *Ack) ProtoReflect() protoreflect.Message {
	mi := &file_mesh_proto_msgTypes[8]
	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 Ack.ProtoReflect.Descriptor instead.
func (*Ack) Descriptor() ([]byte, []int) {
	return file_mesh_proto_rawDescGZIP(), []int{8}
}

func (x *Ack) GetRelayId() string {
	if x != nil {
		return x.RelayId
	}
	return ""
}

func (x *Ack) GetSequenceNumber() uint64 {
	if x != nil {
		return x.SequenceNumber
	}
	return 0
}

// RetransmissionRequest requests a missed StateUpdate.
type RetransmissionRequest struct {
	state          protoimpl.MessageState `protogen:"open.v1"`
	RelayId        string                 `protobuf:"bytes,1,opt,name=relay_id,json=relayId,proto3" json:"relay_id,omitempty"`                       // UUID of the requesting relay
	SequenceNumber uint64                 `protobuf:"varint,2,opt,name=sequence_number,json=sequenceNumber,proto3" json:"sequence_number,omitempty"` // Sequence number of the missed update
	unknownFields  protoimpl.UnknownFields
	sizeCache      protoimpl.SizeCache
}

func (x *RetransmissionRequest) Reset() {
	*x = RetransmissionRequest{}
	mi := &file_mesh_proto_msgTypes[9]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*RetransmissionRequest) ProtoMessage() {}

func (x *RetransmissionRequest) ProtoReflect() protoreflect.Message {
	mi := &file_mesh_proto_msgTypes[9]
	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 RetransmissionRequest.ProtoReflect.Descriptor instead.
func (*RetransmissionRequest) Descriptor() ([]byte, []int) {
	return file_mesh_proto_rawDescGZIP(), []int{9}
}

func (x *RetransmissionRequest) GetRelayId() string {
	if x != nil {
		return x.RelayId
	}
	return ""
}

func (x *RetransmissionRequest) GetSequenceNumber() uint64 {
	if x != nil {
		return x.SequenceNumber
	}
	return 0
}

// Retransmission resends a StateUpdate.
type Retransmission struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	RelayId       string                 `protobuf:"bytes,1,opt,name=relay_id,json=relayId,proto3" json:"relay_id,omitempty"`             // UUID of the sending relay
	StateUpdate   *StateUpdate           `protobuf:"bytes,2,opt,name=state_update,json=stateUpdate,proto3" json:"state_update,omitempty"` // The retransmitted update
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Retransmission) Reset() {
	*x = Retransmission{}
	mi := &file_mesh_proto_msgTypes[10]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*Retransmission) ProtoMessage() {}

func (x *Retransmission) ProtoReflect() protoreflect.Message {
	mi := &file_mesh_proto_msgTypes[10]
	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 Retransmission.ProtoReflect.Descriptor instead.
func (*Retransmission) Descriptor() ([]byte, []int) {
	return file_mesh_proto_rawDescGZIP(), []int{10}
}

func (x *Retransmission) GetRelayId() string {
	if x != nil {
		return x.RelayId
	}
	return ""
}

func (x *Retransmission) GetStateUpdate() *StateUpdate {
	if x != nil {
		return x.StateUpdate
	}
	return nil
}

// Heartbeat signals relay liveness.
type Heartbeat struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	RelayId       string                 `protobuf:"bytes,1,opt,name=relay_id,json=relayId,proto3" json:"relay_id,omitempty"` // UUID of the sending relay
	Timestamp     *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`            // Time of the heartbeat
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Heartbeat) Reset() {
	*x = Heartbeat{}
	mi := &file_mesh_proto_msgTypes[11]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*Heartbeat) ProtoMessage() {}

func (x *Heartbeat) ProtoReflect() protoreflect.Message {
	mi := &file_mesh_proto_msgTypes[11]
	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 Heartbeat.ProtoReflect.Descriptor instead.
func (*Heartbeat) Descriptor() ([]byte, []int) {
	return file_mesh_proto_rawDescGZIP(), []int{11}
}

func (x *Heartbeat) GetRelayId() string {
	if x != nil {
		return x.RelayId
	}
	return ""
}

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

// SuspectRelay marks a relay as potentially unresponsive.
type SuspectRelay struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	RelayId       string                 `protobuf:"bytes,1,opt,name=relay_id,json=relayId,proto3" json:"relay_id,omitempty"` // UUID of the suspected relay
	Reason        string                 `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`                  // Reason for suspicion (e.g., "no heartbeat")
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *SuspectRelay) Reset() {
	*x = SuspectRelay{}
	mi := &file_mesh_proto_msgTypes[12]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*SuspectRelay) ProtoMessage() {}

func (x *SuspectRelay) ProtoReflect() protoreflect.Message {
	mi := &file_mesh_proto_msgTypes[12]
	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 SuspectRelay.ProtoReflect.Descriptor instead.
func (*SuspectRelay) Descriptor() ([]byte, []int) {
	return file_mesh_proto_rawDescGZIP(), []int{12}
}

func (x *SuspectRelay) GetRelayId() string {
	if x != nil {
		return x.RelayId
	}
	return ""
}

func (x *SuspectRelay) GetReason() string {
	if x != nil {
		return x.Reason
	}
	return ""
}

// Disconnect signals to remove a relay from the mesh.
type Disconnect struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	RelayId       string                 `protobuf:"bytes,1,opt,name=relay_id,json=relayId,proto3" json:"relay_id,omitempty"` // UUID of the relay to disconnect
	Reason        string                 `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`                  // Reason for disconnection (e.g., "unresponsive")
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Disconnect) Reset() {
	*x = Disconnect{}
	mi := &file_mesh_proto_msgTypes[13]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*Disconnect) ProtoMessage() {}

func (x *Disconnect) ProtoReflect() protoreflect.Message {
	mi := &file_mesh_proto_msgTypes[13]
	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 Disconnect.ProtoReflect.Descriptor instead.
func (*Disconnect) Descriptor() ([]byte, []int) {
	return file_mesh_proto_rawDescGZIP(), []int{13}
}

func (x *Disconnect) GetRelayId() string {
	if x != nil {
		return x.RelayId
	}
	return ""
}

func (x *Disconnect) GetReason() string {
	if x != nil {
		return x.Reason
	}
	return ""
}

var File_mesh_proto protoreflect.FileDescriptor

const file_mesh_proto_rawDesc = "" +
	"\n" +
	"\n" +
	"mesh.proto\x12\x05proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\vstate.proto\x1a\fwebrtc.proto\"\x90\x06\n" +
	"\vMeshMessage\x127\n" +
	"\fstate_update\x18\x01 \x01(\v2\x12.proto.StateUpdateH\x00R\vstateUpdate\x12\x1e\n" +
	"\x03ack\x18\x02 \x01(\v2\n" +
	".proto.AckH\x00R\x03ack\x12U\n" +
	"\x16retransmission_request\x18\x03 \x01(\v2\x1c.proto.RetransmissionRequestH\x00R\x15retransmissionRequest\x12?\n" +
	"\x0eretransmission\x18\x04 \x01(\v2\x15.proto.RetransmissionH\x00R\x0eretransmission\x120\n" +
	"\theartbeat\x18\x05 \x01(\v2\x10.proto.HeartbeatH\x00R\theartbeat\x12:\n" +
	"\rsuspect_relay\x18\x06 \x01(\v2\x13.proto.SuspectRelayH\x00R\fsuspectRelay\x123\n" +
	"\n" +
	"disconnect\x18\a \x01(\v2\x11.proto.DisconnectH\x00R\n" +
	"disconnect\x124\n" +
	"\vforward_sdp\x18\b \x01(\v2\x11.proto.ForwardSDPH\x00R\n" +
	"forwardSdp\x124\n" +
	"\vforward_ice\x18\t \x01(\v2\x11.proto.ForwardICEH\x00R\n" +
	"forwardIce\x12=\n" +
	"\x0eforward_ingest\x18\n" +
	" \x01(\v2\x14.proto.ForwardIngestH\x00R\rforwardIngest\x12=\n" +
	"\x0estream_request\x18\v \x01(\v2\x14.proto.StreamRequestH\x00R\rstreamRequest\x120\n" +
	"\thandshake\x18\f \x01(\v2\x10.proto.HandshakeH\x00R\thandshake\x12I\n" +
	"\x12handshake_response\x18\r \x01(\v2\x18.proto.HandshakeResponseH\x00R\x11handshakeResponseB\x06\n" +
	"\x04type\"J\n" +
	"\tHandshake\x12\x19\n" +
	"\brelay_id\x18\x01 \x01(\tR\arelayId\x12\"\n" +
	"\rdh_public_key\x18\x02 \x01(\tR\vdhPublicKey\"\xd7\x01\n" +
	"\x11HandshakeResponse\x12\x19\n" +
	"\brelay_id\x18\x01 \x01(\tR\arelayId\x12\"\n" +
	"\rdh_public_key\x18\x02 \x01(\tR\vdhPublicKey\x12E\n" +
	"\tapprovals\x18\x03 \x03(\v2'.proto.HandshakeResponse.ApprovalsEntryR\tapprovals\x1a<\n" +
	"\x0eApprovalsEntry\x12\x10\n" +
	"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
	"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"v\n" +
	"\n" +
	"ForwardSDP\x12\x1b\n" +
	"\troom_name\x18\x01 \x01(\tR\broomName\x12%\n" +
	"\x0eparticipant_id\x18\x02 \x01(\tR\rparticipantId\x12\x10\n" +
	"\x03sdp\x18\x03 \x01(\tR\x03sdp\x12\x12\n" +
	"\x04type\x18\x04 \x01(\tR\x04type\"\x87\x01\n" +
	"\n" +
	"ForwardICE\x12\x1b\n" +
	"\troom_name\x18\x01 \x01(\tR\broomName\x12%\n" +
	"\x0eparticipant_id\x18\x02 \x01(\tR\rparticipantId\x125\n" +
	"\tcandidate\x18\x03 \x01(\v2\x17.proto.ICECandidateInitR\tcandidate\",\n" +
	"\rForwardIngest\x12\x1b\n" +
	"\troom_name\x18\x01 \x01(\tR\broomName\",\n" +
	"\rStreamRequest\x12\x1b\n" +
	"\troom_name\x18\x01 \x01(\tR\broomName\"\xc5\x01\n" +
	"\vStateUpdate\x12'\n" +
	"\x0fsequence_number\x18\x01 \x01(\x04R\x0esequenceNumber\x12<\n" +
	"\bentities\x18\x02 \x03(\v2 .proto.StateUpdate.EntitiesEntryR\bentities\x1aO\n" +
	"\rEntitiesEntry\x12\x10\n" +
	"\x03key\x18\x01 \x01(\tR\x03key\x12(\n" +
	"\x05value\x18\x02 \x01(\v2\x12.proto.EntityStateR\x05value:\x028\x01\"I\n" +
	"\x03Ack\x12\x19\n" +
	"\brelay_id\x18\x01 \x01(\tR\arelayId\x12'\n" +
	"\x0fsequence_number\x18\x02 \x01(\x04R\x0esequenceNumber\"[\n" +
	"\x15RetransmissionRequest\x12\x19\n" +
	"\brelay_id\x18\x01 \x01(\tR\arelayId\x12'\n" +
	"\x0fsequence_number\x18\x02 \x01(\x04R\x0esequenceNumber\"b\n" +
	"\x0eRetransmission\x12\x19\n" +
	"\brelay_id\x18\x01 \x01(\tR\arelayId\x125\n" +
	"\fstate_update\x18\x02 \x01(\v2\x12.proto.StateUpdateR\vstateUpdate\"`\n" +
	"\tHeartbeat\x12\x19\n" +
	"\brelay_id\x18\x01 \x01(\tR\arelayId\x128\n" +
	"\ttimestamp\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\ttimestamp\"A\n" +
	"\fSuspectRelay\x12\x19\n" +
	"\brelay_id\x18\x01 \x01(\tR\arelayId\x12\x16\n" +
	"\x06reason\x18\x02 \x01(\tR\x06reason\"?\n" +
	"\n" +
	"Disconnect\x12\x19\n" +
	"\brelay_id\x18\x01 \x01(\tR\arelayId\x12\x16\n" +
	"\x06reason\x18\x02 \x01(\tR\x06reasonB\x16Z\x14relay/internal/protob\x06proto3"

var (
	file_mesh_proto_rawDescOnce sync.Once
	file_mesh_proto_rawDescData []byte
)

func file_mesh_proto_rawDescGZIP() []byte {
	file_mesh_proto_rawDescOnce.Do(func() {
		file_mesh_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_mesh_proto_rawDesc), len(file_mesh_proto_rawDesc)))
	})
	return file_mesh_proto_rawDescData
}

var file_mesh_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
var file_mesh_proto_goTypes = []any{
	(*MeshMessage)(nil),           // 0: proto.MeshMessage
	(*Handshake)(nil),             // 1: proto.Handshake
	(*HandshakeResponse)(nil),     // 2: proto.HandshakeResponse
	(*ForwardSDP)(nil),            // 3: proto.ForwardSDP
	(*ForwardICE)(nil),            // 4: proto.ForwardICE
	(*ForwardIngest)(nil),         // 5: proto.ForwardIngest
	(*StreamRequest)(nil),         // 6: proto.StreamRequest
	(*StateUpdate)(nil),           // 7: proto.StateUpdate
	(*Ack)(nil),                   // 8: proto.Ack
	(*RetransmissionRequest)(nil), // 9: proto.RetransmissionRequest
	(*Retransmission)(nil),        // 10: proto.Retransmission
	(*Heartbeat)(nil),             // 11: proto.Heartbeat
	(*SuspectRelay)(nil),          // 12: proto.SuspectRelay
	(*Disconnect)(nil),            // 13: proto.Disconnect
	nil,                           // 14: proto.HandshakeResponse.ApprovalsEntry
	nil,                           // 15: proto.StateUpdate.EntitiesEntry
	(*ICECandidateInit)(nil),      // 16: proto.ICECandidateInit
	(*timestamppb.Timestamp)(nil), // 17: google.protobuf.Timestamp
	(*EntityState)(nil),           // 18: proto.EntityState
}
var file_mesh_proto_depIdxs = []int32{
	7,  // 0: proto.MeshMessage.state_update:type_name -> proto.StateUpdate
	8,  // 1: proto.MeshMessage.ack:type_name -> proto.Ack
	9,  // 2: proto.MeshMessage.retransmission_request:type_name -> proto.RetransmissionRequest
	10, // 3: proto.MeshMessage.retransmission:type_name -> proto.Retransmission
	11, // 4: proto.MeshMessage.heartbeat:type_name -> proto.Heartbeat
	12, // 5: proto.MeshMessage.suspect_relay:type_name -> proto.SuspectRelay
	13, // 6: proto.MeshMessage.disconnect:type_name -> proto.Disconnect
	3,  // 7: proto.MeshMessage.forward_sdp:type_name -> proto.ForwardSDP
	4,  // 8: proto.MeshMessage.forward_ice:type_name -> proto.ForwardICE
	5,  // 9: proto.MeshMessage.forward_ingest:type_name -> proto.ForwardIngest
	6,  // 10: proto.MeshMessage.stream_request:type_name -> proto.StreamRequest
	1,  // 11: proto.MeshMessage.handshake:type_name -> proto.Handshake
	2,  // 12: proto.MeshMessage.handshake_response:type_name -> proto.HandshakeResponse
	14, // 13: proto.HandshakeResponse.approvals:type_name -> proto.HandshakeResponse.ApprovalsEntry
	16, // 14: proto.ForwardICE.candidate:type_name -> proto.ICECandidateInit
	15, // 15: proto.StateUpdate.entities:type_name -> proto.StateUpdate.EntitiesEntry
	7,  // 16: proto.Retransmission.state_update:type_name -> proto.StateUpdate
	17, // 17: proto.Heartbeat.timestamp:type_name -> google.protobuf.Timestamp
	18, // 18: proto.StateUpdate.EntitiesEntry.value:type_name -> proto.EntityState
	19, // [19:19] is the sub-list for method output_type
	19, // [19:19] is the sub-list for method input_type
	19, // [19:19] is the sub-list for extension type_name
	19, // [19:19] is the sub-list for extension extendee
	0,  // [0:19] is the sub-list for field type_name
}

func init() { file_mesh_proto_init() }
func file_mesh_proto_init() {
	if File_mesh_proto != nil {
		return
	}
	file_state_proto_init()
	file_webrtc_proto_init()
	file_mesh_proto_msgTypes[0].OneofWrappers = []any{
		(*MeshMessage_StateUpdate)(nil),
		(*MeshMessage_Ack)(nil),
		(*MeshMessage_RetransmissionRequest)(nil),
		(*MeshMessage_Retransmission)(nil),
		(*MeshMessage_Heartbeat)(nil),
		(*MeshMessage_SuspectRelay)(nil),
		(*MeshMessage_Disconnect)(nil),
		(*MeshMessage_ForwardSdp)(nil),
		(*MeshMessage_ForwardIce)(nil),
		(*MeshMessage_ForwardIngest)(nil),
		(*MeshMessage_StreamRequest)(nil),
		(*MeshMessage_Handshake)(nil),
		(*MeshMessage_HandshakeResponse)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_mesh_proto_rawDesc), len(file_mesh_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   16,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_mesh_proto_goTypes,
		DependencyIndexes: file_mesh_proto_depIdxs,
		MessageInfos:      file_mesh_proto_msgTypes,
	}.Build()
	File_mesh_proto = out.File
	file_mesh_proto_goTypes = nil
	file_mesh_proto_depIdxs = nil
}
