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

package streamv1

import (
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"

	code "google.golang.org/genproto/googleapis/rpc/code"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"

	v2 "github.com/runmedev/runme/v3/api/gen/proto/go/runme/runner/v2"
)

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

// Represents websocket-level status (e.g., for auth, protocol, or other errors).
type WebsocketStatus struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Code          code.Code              `protobuf:"varint,1,opt,name=code,proto3,enum=google.rpc.Code" json:"code,omitempty"`
	Message       string                 `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*WebsocketStatus) ProtoMessage() {}

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

func (x *WebsocketStatus) GetCode() code.Code {
	if x != nil {
		return x.Code
	}
	return code.Code(0)
}

func (x *WebsocketStatus) GetMessage() string {
	if x != nil {
		return x.Message
	}
	return ""
}

// Ping message for protocol-level keep-alive
type Ping struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Timestamp     int64                  `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Ping) ProtoMessage() {}

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

func (x *Ping) GetTimestamp() int64 {
	if x != nil {
		return x.Timestamp
	}
	return 0
}

// Pong message for protocol-level keep-alive response
type Pong struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Timestamp     int64                  `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Pong) ProtoMessage() {}

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

func (x *Pong) GetTimestamp() int64 {
	if x != nil {
		return x.Timestamp
	}
	return 0
}

// WebsocketRequest defines the message sent by the client over a websocket.
// The request is a union of types that indicate the type of message.
type WebsocketRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Types that are valid to be assigned to Payload:
	//
	//	*WebsocketRequest_ExecuteRequest
	Payload isWebsocketRequest_Payload `protobuf_oneof:"payload"`
	// Protocol-level ping for frontend heartbeat. Unlike websocket servers which
	// have a spec-integral heartbeat (https://developer.mozilla.org/en-US/docs/Web/API/WebWebsockets_API/Writing_WebWebsocket_servers#pings_and_pongs_the_heartbeat_of_websockets),
	// we need to specify our own to cover client->server. The integral heartbeat
	// only works server->client and the browser sandbox is not privy to it.
	// Once the server receives a ping, it will send a pong response with the
	// exact same timestamp.
	Ping *Ping `protobuf:"bytes,100,opt,name=ping,proto3" json:"ping,omitempty"`
	// Optional authorization header, similar to the HTTP Authorization header.
	Authorization string `protobuf:"bytes,200,opt,name=authorization,proto3" json:"authorization,omitempty"`
	// Optional Known ID to track the origin cell/block of the request.
	KnownId string `protobuf:"bytes,210,opt,name=known_id,json=knownId,proto3" json:"known_id,omitempty"`
	// Optional Run ID to track and resume execution.
	RunId         string `protobuf:"bytes,220,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*WebsocketRequest) ProtoMessage() {}

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

func (x *WebsocketRequest) GetPayload() isWebsocketRequest_Payload {
	if x != nil {
		return x.Payload
	}
	return nil
}

func (x *WebsocketRequest) GetExecuteRequest() *v2.ExecuteRequest {
	if x != nil {
		if x, ok := x.Payload.(*WebsocketRequest_ExecuteRequest); ok {
			return x.ExecuteRequest
		}
	}
	return nil
}

func (x *WebsocketRequest) GetPing() *Ping {
	if x != nil {
		return x.Ping
	}
	return nil
}

func (x *WebsocketRequest) GetAuthorization() string {
	if x != nil {
		return x.Authorization
	}
	return ""
}

func (x *WebsocketRequest) GetKnownId() string {
	if x != nil {
		return x.KnownId
	}
	return ""
}

func (x *WebsocketRequest) GetRunId() string {
	if x != nil {
		return x.RunId
	}
	return ""
}

type isWebsocketRequest_Payload interface {
	isWebsocketRequest_Payload()
}

type WebsocketRequest_ExecuteRequest struct {
	ExecuteRequest *v2.ExecuteRequest `protobuf:"bytes,1,opt,name=execute_request,json=executeRequest,proto3,oneof"` // Add other payloads here as needed.
}

func (*WebsocketRequest_ExecuteRequest) isWebsocketRequest_Payload() {}

// WebsocketResponse defines the message sent by the server over a websocket.
// The response is a union of types that indicate the type of message.
type WebsocketResponse struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Types that are valid to be assigned to Payload:
	//
	//	*WebsocketResponse_ExecuteResponse
	Payload isWebsocketResponse_Payload `protobuf_oneof:"payload"`
	// Protocol-level pong for frontend heartbeat. Once the server receives
	// a ping, it will send a pong response with the exact same timestamp.
	// This allows the frontend (client) to detect if the connection is
	// still alive or stale/inactive. See WebsocketRequest's ping for more details.
	Pong *Pong `protobuf:"bytes,100,opt,name=pong,proto3" json:"pong,omitempty"`
	// Optional websocket-level status.
	Status *WebsocketStatus `protobuf:"bytes,200,opt,name=status,proto3" json:"status,omitempty"`
	// Optional Known ID to track the origin cell/block of the request.
	KnownId string `protobuf:"bytes,210,opt,name=known_id,json=knownId,proto3" json:"known_id,omitempty"`
	// Optional Run ID to track and resume execution.
	RunId         string `protobuf:"bytes,220,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*WebsocketResponse) ProtoMessage() {}

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

func (x *WebsocketResponse) GetPayload() isWebsocketResponse_Payload {
	if x != nil {
		return x.Payload
	}
	return nil
}

func (x *WebsocketResponse) GetExecuteResponse() *v2.ExecuteResponse {
	if x != nil {
		if x, ok := x.Payload.(*WebsocketResponse_ExecuteResponse); ok {
			return x.ExecuteResponse
		}
	}
	return nil
}

func (x *WebsocketResponse) GetPong() *Pong {
	if x != nil {
		return x.Pong
	}
	return nil
}

func (x *WebsocketResponse) GetStatus() *WebsocketStatus {
	if x != nil {
		return x.Status
	}
	return nil
}

func (x *WebsocketResponse) GetKnownId() string {
	if x != nil {
		return x.KnownId
	}
	return ""
}

func (x *WebsocketResponse) GetRunId() string {
	if x != nil {
		return x.RunId
	}
	return ""
}

type isWebsocketResponse_Payload interface {
	isWebsocketResponse_Payload()
}

type WebsocketResponse_ExecuteResponse struct {
	ExecuteResponse *v2.ExecuteResponse `protobuf:"bytes,1,opt,name=execute_response,json=executeResponse,proto3,oneof"` // Add other payloads here as needed.
}

func (*WebsocketResponse_ExecuteResponse) isWebsocketResponse_Payload() {}

var File_runme_stream_v1_websockets_proto protoreflect.FileDescriptor

const file_runme_stream_v1_websockets_proto_rawDesc = "" +
	"\n" +
	" runme/stream/v1/websockets.proto\x12\x0frunme.stream.v1\x1a\x15google/rpc/code.proto\x1a\x1crunme/runner/v2/runner.proto\"Q\n" +
	"\x0fWebsocketStatus\x12$\n" +
	"\x04code\x18\x01 \x01(\x0e2\x10.google.rpc.CodeR\x04code\x12\x18\n" +
	"\amessage\x18\x02 \x01(\tR\amessage\"$\n" +
	"\x04Ping\x12\x1c\n" +
	"\ttimestamp\x18\x01 \x01(\x03R\ttimestamp\"$\n" +
	"\x04Pong\x12\x1c\n" +
	"\ttimestamp\x18\x01 \x01(\x03R\ttimestamp\"\xef\x01\n" +
	"\x10WebsocketRequest\x12J\n" +
	"\x0fexecute_request\x18\x01 \x01(\v2\x1f.runme.runner.v2.ExecuteRequestH\x00R\x0eexecuteRequest\x12)\n" +
	"\x04ping\x18d \x01(\v2\x15.runme.stream.v1.PingR\x04ping\x12%\n" +
	"\rauthorization\x18\xc8\x01 \x01(\tR\rauthorization\x12\x1a\n" +
	"\bknown_id\x18\xd2\x01 \x01(\tR\aknownId\x12\x16\n" +
	"\x06run_id\x18\xdc\x01 \x01(\tR\x05runIdB\t\n" +
	"\apayload\"\x87\x02\n" +
	"\x11WebsocketResponse\x12M\n" +
	"\x10execute_response\x18\x01 \x01(\v2 .runme.runner.v2.ExecuteResponseH\x00R\x0fexecuteResponse\x12)\n" +
	"\x04pong\x18d \x01(\v2\x15.runme.stream.v1.PongR\x04pong\x129\n" +
	"\x06status\x18\xc8\x01 \x01(\v2 .runme.stream.v1.WebsocketStatusR\x06status\x12\x1a\n" +
	"\bknown_id\x18\xd2\x01 \x01(\tR\aknownId\x12\x16\n" +
	"\x06run_id\x18\xdc\x01 \x01(\tR\x05runIdB\t\n" +
	"\apayloadBHZFgithub.com/runmedev/runme/v3/api/gen/proto/go/runme/stream/v1;streamv1b\x06proto3"

var (
	file_runme_stream_v1_websockets_proto_rawDescOnce sync.Once
	file_runme_stream_v1_websockets_proto_rawDescData []byte
)

func file_runme_stream_v1_websockets_proto_rawDescGZIP() []byte {
	file_runme_stream_v1_websockets_proto_rawDescOnce.Do(func() {
		file_runme_stream_v1_websockets_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_runme_stream_v1_websockets_proto_rawDesc), len(file_runme_stream_v1_websockets_proto_rawDesc)))
	})
	return file_runme_stream_v1_websockets_proto_rawDescData
}

var file_runme_stream_v1_websockets_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_runme_stream_v1_websockets_proto_goTypes = []any{
	(*WebsocketStatus)(nil),    // 0: runme.stream.v1.WebsocketStatus
	(*Ping)(nil),               // 1: runme.stream.v1.Ping
	(*Pong)(nil),               // 2: runme.stream.v1.Pong
	(*WebsocketRequest)(nil),   // 3: runme.stream.v1.WebsocketRequest
	(*WebsocketResponse)(nil),  // 4: runme.stream.v1.WebsocketResponse
	(code.Code)(0),             // 5: google.rpc.Code
	(*v2.ExecuteRequest)(nil),  // 6: runme.runner.v2.ExecuteRequest
	(*v2.ExecuteResponse)(nil), // 7: runme.runner.v2.ExecuteResponse
}
var file_runme_stream_v1_websockets_proto_depIdxs = []int32{
	5, // 0: runme.stream.v1.WebsocketStatus.code:type_name -> google.rpc.Code
	6, // 1: runme.stream.v1.WebsocketRequest.execute_request:type_name -> runme.runner.v2.ExecuteRequest
	1, // 2: runme.stream.v1.WebsocketRequest.ping:type_name -> runme.stream.v1.Ping
	7, // 3: runme.stream.v1.WebsocketResponse.execute_response:type_name -> runme.runner.v2.ExecuteResponse
	2, // 4: runme.stream.v1.WebsocketResponse.pong:type_name -> runme.stream.v1.Pong
	0, // 5: runme.stream.v1.WebsocketResponse.status:type_name -> runme.stream.v1.WebsocketStatus
	6, // [6:6] is the sub-list for method output_type
	6, // [6:6] is the sub-list for method input_type
	6, // [6:6] is the sub-list for extension type_name
	6, // [6:6] is the sub-list for extension extendee
	0, // [0:6] is the sub-list for field type_name
}

func init() { file_runme_stream_v1_websockets_proto_init() }
func file_runme_stream_v1_websockets_proto_init() {
	if File_runme_stream_v1_websockets_proto != nil {
		return
	}
	file_runme_stream_v1_websockets_proto_msgTypes[3].OneofWrappers = []any{
		(*WebsocketRequest_ExecuteRequest)(nil),
	}
	file_runme_stream_v1_websockets_proto_msgTypes[4].OneofWrappers = []any{
		(*WebsocketResponse_ExecuteResponse)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_runme_stream_v1_websockets_proto_rawDesc), len(file_runme_stream_v1_websockets_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   5,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_runme_stream_v1_websockets_proto_goTypes,
		DependencyIndexes: file_runme_stream_v1_websockets_proto_depIdxs,
		MessageInfos:      file_runme_stream_v1_websockets_proto_msgTypes,
	}.Build()
	File_runme_stream_v1_websockets_proto = out.File
	file_runme_stream_v1_websockets_proto_goTypes = nil
	file_runme_stream_v1_websockets_proto_depIdxs = nil
}
