mirror of
https://github.com/criyle/go-judge.git
synced 2025-09-26 22:39:12 +08:00
576 lines
15 KiB
Go
576 lines
15 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.6
|
|
// protoc v6.31.1
|
|
// source: stream_request.proto
|
|
|
|
package pb
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
_ "google.golang.org/protobuf/types/gofeaturespb"
|
|
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
|
reflect "reflect"
|
|
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 StreamRequest struct {
|
|
state protoimpl.MessageState `protogen:"opaque.v1"`
|
|
xxx_hidden_Request isStreamRequest_Request `protobuf_oneof:"request"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *StreamRequest) Reset() {
|
|
*x = StreamRequest{}
|
|
mi := &file_stream_request_proto_msgTypes[0]
|
|
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_stream_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)
|
|
}
|
|
|
|
func (x *StreamRequest) GetExecRequest() *Request {
|
|
if x != nil {
|
|
if x, ok := x.xxx_hidden_Request.(*streamRequest_ExecRequest); ok {
|
|
return x.ExecRequest
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *StreamRequest) GetExecInput() *StreamRequest_Input {
|
|
if x != nil {
|
|
if x, ok := x.xxx_hidden_Request.(*streamRequest_ExecInput); ok {
|
|
return x.ExecInput
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *StreamRequest) GetExecResize() *StreamRequest_Resize {
|
|
if x != nil {
|
|
if x, ok := x.xxx_hidden_Request.(*streamRequest_ExecResize); ok {
|
|
return x.ExecResize
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *StreamRequest) GetExecCancel() *emptypb.Empty {
|
|
if x != nil {
|
|
if x, ok := x.xxx_hidden_Request.(*streamRequest_ExecCancel); ok {
|
|
return x.ExecCancel
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *StreamRequest) SetExecRequest(v *Request) {
|
|
if v == nil {
|
|
x.xxx_hidden_Request = nil
|
|
return
|
|
}
|
|
x.xxx_hidden_Request = &streamRequest_ExecRequest{v}
|
|
}
|
|
|
|
func (x *StreamRequest) SetExecInput(v *StreamRequest_Input) {
|
|
if v == nil {
|
|
x.xxx_hidden_Request = nil
|
|
return
|
|
}
|
|
x.xxx_hidden_Request = &streamRequest_ExecInput{v}
|
|
}
|
|
|
|
func (x *StreamRequest) SetExecResize(v *StreamRequest_Resize) {
|
|
if v == nil {
|
|
x.xxx_hidden_Request = nil
|
|
return
|
|
}
|
|
x.xxx_hidden_Request = &streamRequest_ExecResize{v}
|
|
}
|
|
|
|
func (x *StreamRequest) SetExecCancel(v *emptypb.Empty) {
|
|
if v == nil {
|
|
x.xxx_hidden_Request = nil
|
|
return
|
|
}
|
|
x.xxx_hidden_Request = &streamRequest_ExecCancel{v}
|
|
}
|
|
|
|
func (x *StreamRequest) HasRequest() bool {
|
|
if x == nil {
|
|
return false
|
|
}
|
|
return x.xxx_hidden_Request != nil
|
|
}
|
|
|
|
func (x *StreamRequest) HasExecRequest() bool {
|
|
if x == nil {
|
|
return false
|
|
}
|
|
_, ok := x.xxx_hidden_Request.(*streamRequest_ExecRequest)
|
|
return ok
|
|
}
|
|
|
|
func (x *StreamRequest) HasExecInput() bool {
|
|
if x == nil {
|
|
return false
|
|
}
|
|
_, ok := x.xxx_hidden_Request.(*streamRequest_ExecInput)
|
|
return ok
|
|
}
|
|
|
|
func (x *StreamRequest) HasExecResize() bool {
|
|
if x == nil {
|
|
return false
|
|
}
|
|
_, ok := x.xxx_hidden_Request.(*streamRequest_ExecResize)
|
|
return ok
|
|
}
|
|
|
|
func (x *StreamRequest) HasExecCancel() bool {
|
|
if x == nil {
|
|
return false
|
|
}
|
|
_, ok := x.xxx_hidden_Request.(*streamRequest_ExecCancel)
|
|
return ok
|
|
}
|
|
|
|
func (x *StreamRequest) ClearRequest() {
|
|
x.xxx_hidden_Request = nil
|
|
}
|
|
|
|
func (x *StreamRequest) ClearExecRequest() {
|
|
if _, ok := x.xxx_hidden_Request.(*streamRequest_ExecRequest); ok {
|
|
x.xxx_hidden_Request = nil
|
|
}
|
|
}
|
|
|
|
func (x *StreamRequest) ClearExecInput() {
|
|
if _, ok := x.xxx_hidden_Request.(*streamRequest_ExecInput); ok {
|
|
x.xxx_hidden_Request = nil
|
|
}
|
|
}
|
|
|
|
func (x *StreamRequest) ClearExecResize() {
|
|
if _, ok := x.xxx_hidden_Request.(*streamRequest_ExecResize); ok {
|
|
x.xxx_hidden_Request = nil
|
|
}
|
|
}
|
|
|
|
func (x *StreamRequest) ClearExecCancel() {
|
|
if _, ok := x.xxx_hidden_Request.(*streamRequest_ExecCancel); ok {
|
|
x.xxx_hidden_Request = nil
|
|
}
|
|
}
|
|
|
|
const StreamRequest_Request_not_set_case case_StreamRequest_Request = 0
|
|
const StreamRequest_ExecRequest_case case_StreamRequest_Request = 1
|
|
const StreamRequest_ExecInput_case case_StreamRequest_Request = 2
|
|
const StreamRequest_ExecResize_case case_StreamRequest_Request = 3
|
|
const StreamRequest_ExecCancel_case case_StreamRequest_Request = 4
|
|
|
|
func (x *StreamRequest) WhichRequest() case_StreamRequest_Request {
|
|
if x == nil {
|
|
return StreamRequest_Request_not_set_case
|
|
}
|
|
switch x.xxx_hidden_Request.(type) {
|
|
case *streamRequest_ExecRequest:
|
|
return StreamRequest_ExecRequest_case
|
|
case *streamRequest_ExecInput:
|
|
return StreamRequest_ExecInput_case
|
|
case *streamRequest_ExecResize:
|
|
return StreamRequest_ExecResize_case
|
|
case *streamRequest_ExecCancel:
|
|
return StreamRequest_ExecCancel_case
|
|
default:
|
|
return StreamRequest_Request_not_set_case
|
|
}
|
|
}
|
|
|
|
type StreamRequest_builder struct {
|
|
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
|
|
|
|
// Fields of oneof xxx_hidden_Request:
|
|
ExecRequest *Request
|
|
ExecInput *StreamRequest_Input
|
|
ExecResize *StreamRequest_Resize
|
|
ExecCancel *emptypb.Empty
|
|
// -- end of xxx_hidden_Request
|
|
}
|
|
|
|
func (b0 StreamRequest_builder) Build() *StreamRequest {
|
|
m0 := &StreamRequest{}
|
|
b, x := &b0, m0
|
|
_, _ = b, x
|
|
if b.ExecRequest != nil {
|
|
x.xxx_hidden_Request = &streamRequest_ExecRequest{b.ExecRequest}
|
|
}
|
|
if b.ExecInput != nil {
|
|
x.xxx_hidden_Request = &streamRequest_ExecInput{b.ExecInput}
|
|
}
|
|
if b.ExecResize != nil {
|
|
x.xxx_hidden_Request = &streamRequest_ExecResize{b.ExecResize}
|
|
}
|
|
if b.ExecCancel != nil {
|
|
x.xxx_hidden_Request = &streamRequest_ExecCancel{b.ExecCancel}
|
|
}
|
|
return m0
|
|
}
|
|
|
|
type case_StreamRequest_Request protoreflect.FieldNumber
|
|
|
|
func (x case_StreamRequest_Request) String() string {
|
|
md := file_stream_request_proto_msgTypes[0].Descriptor()
|
|
if x == 0 {
|
|
return "not set"
|
|
}
|
|
return protoimpl.X.MessageFieldStringOf(md, protoreflect.FieldNumber(x))
|
|
}
|
|
|
|
type isStreamRequest_Request interface {
|
|
isStreamRequest_Request()
|
|
}
|
|
|
|
type streamRequest_ExecRequest struct {
|
|
ExecRequest *Request `protobuf:"bytes,1,opt,name=execRequest,oneof"`
|
|
}
|
|
|
|
type streamRequest_ExecInput struct {
|
|
ExecInput *StreamRequest_Input `protobuf:"bytes,2,opt,name=execInput,oneof"`
|
|
}
|
|
|
|
type streamRequest_ExecResize struct {
|
|
ExecResize *StreamRequest_Resize `protobuf:"bytes,3,opt,name=execResize,oneof"`
|
|
}
|
|
|
|
type streamRequest_ExecCancel struct {
|
|
ExecCancel *emptypb.Empty `protobuf:"bytes,4,opt,name=execCancel,oneof"`
|
|
}
|
|
|
|
func (*streamRequest_ExecRequest) isStreamRequest_Request() {}
|
|
|
|
func (*streamRequest_ExecInput) isStreamRequest_Request() {}
|
|
|
|
func (*streamRequest_ExecResize) isStreamRequest_Request() {}
|
|
|
|
func (*streamRequest_ExecCancel) isStreamRequest_Request() {}
|
|
|
|
type StreamRequest_Input struct {
|
|
state protoimpl.MessageState `protogen:"opaque.v1"`
|
|
xxx_hidden_Index uint32 `protobuf:"varint,1,opt,name=index"`
|
|
xxx_hidden_Fd uint32 `protobuf:"varint,3,opt,name=fd"`
|
|
xxx_hidden_Content []byte `protobuf:"bytes,2,opt,name=content"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *StreamRequest_Input) Reset() {
|
|
*x = StreamRequest_Input{}
|
|
mi := &file_stream_request_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *StreamRequest_Input) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*StreamRequest_Input) ProtoMessage() {}
|
|
|
|
func (x *StreamRequest_Input) ProtoReflect() protoreflect.Message {
|
|
mi := &file_stream_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)
|
|
}
|
|
|
|
func (x *StreamRequest_Input) GetIndex() uint32 {
|
|
if x != nil {
|
|
return x.xxx_hidden_Index
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *StreamRequest_Input) GetFd() uint32 {
|
|
if x != nil {
|
|
return x.xxx_hidden_Fd
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *StreamRequest_Input) GetContent() []byte {
|
|
if x != nil {
|
|
return x.xxx_hidden_Content
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *StreamRequest_Input) SetIndex(v uint32) {
|
|
x.xxx_hidden_Index = v
|
|
}
|
|
|
|
func (x *StreamRequest_Input) SetFd(v uint32) {
|
|
x.xxx_hidden_Fd = v
|
|
}
|
|
|
|
func (x *StreamRequest_Input) SetContent(v []byte) {
|
|
if v == nil {
|
|
v = []byte{}
|
|
}
|
|
x.xxx_hidden_Content = v
|
|
}
|
|
|
|
type StreamRequest_Input_builder struct {
|
|
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
|
|
|
|
Index uint32
|
|
Fd uint32
|
|
Content []byte
|
|
}
|
|
|
|
func (b0 StreamRequest_Input_builder) Build() *StreamRequest_Input {
|
|
m0 := &StreamRequest_Input{}
|
|
b, x := &b0, m0
|
|
_, _ = b, x
|
|
x.xxx_hidden_Index = b.Index
|
|
x.xxx_hidden_Fd = b.Fd
|
|
x.xxx_hidden_Content = b.Content
|
|
return m0
|
|
}
|
|
|
|
type StreamRequest_Resize struct {
|
|
state protoimpl.MessageState `protogen:"opaque.v1"`
|
|
xxx_hidden_Index uint32 `protobuf:"varint,1,opt,name=index"`
|
|
xxx_hidden_Fd uint32 `protobuf:"varint,6,opt,name=fd"`
|
|
xxx_hidden_Rows uint32 `protobuf:"varint,2,opt,name=rows"`
|
|
xxx_hidden_Cols uint32 `protobuf:"varint,3,opt,name=cols"`
|
|
xxx_hidden_X uint32 `protobuf:"varint,4,opt,name=x"`
|
|
xxx_hidden_Y uint32 `protobuf:"varint,5,opt,name=y"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *StreamRequest_Resize) Reset() {
|
|
*x = StreamRequest_Resize{}
|
|
mi := &file_stream_request_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *StreamRequest_Resize) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*StreamRequest_Resize) ProtoMessage() {}
|
|
|
|
func (x *StreamRequest_Resize) ProtoReflect() protoreflect.Message {
|
|
mi := &file_stream_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)
|
|
}
|
|
|
|
func (x *StreamRequest_Resize) GetIndex() uint32 {
|
|
if x != nil {
|
|
return x.xxx_hidden_Index
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *StreamRequest_Resize) GetFd() uint32 {
|
|
if x != nil {
|
|
return x.xxx_hidden_Fd
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *StreamRequest_Resize) GetRows() uint32 {
|
|
if x != nil {
|
|
return x.xxx_hidden_Rows
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *StreamRequest_Resize) GetCols() uint32 {
|
|
if x != nil {
|
|
return x.xxx_hidden_Cols
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *StreamRequest_Resize) GetX() uint32 {
|
|
if x != nil {
|
|
return x.xxx_hidden_X
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *StreamRequest_Resize) GetY() uint32 {
|
|
if x != nil {
|
|
return x.xxx_hidden_Y
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *StreamRequest_Resize) SetIndex(v uint32) {
|
|
x.xxx_hidden_Index = v
|
|
}
|
|
|
|
func (x *StreamRequest_Resize) SetFd(v uint32) {
|
|
x.xxx_hidden_Fd = v
|
|
}
|
|
|
|
func (x *StreamRequest_Resize) SetRows(v uint32) {
|
|
x.xxx_hidden_Rows = v
|
|
}
|
|
|
|
func (x *StreamRequest_Resize) SetCols(v uint32) {
|
|
x.xxx_hidden_Cols = v
|
|
}
|
|
|
|
func (x *StreamRequest_Resize) SetX(v uint32) {
|
|
x.xxx_hidden_X = v
|
|
}
|
|
|
|
func (x *StreamRequest_Resize) SetY(v uint32) {
|
|
x.xxx_hidden_Y = v
|
|
}
|
|
|
|
type StreamRequest_Resize_builder struct {
|
|
_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.
|
|
|
|
Index uint32
|
|
Fd uint32
|
|
Rows uint32
|
|
Cols uint32
|
|
X uint32
|
|
Y uint32
|
|
}
|
|
|
|
func (b0 StreamRequest_Resize_builder) Build() *StreamRequest_Resize {
|
|
m0 := &StreamRequest_Resize{}
|
|
b, x := &b0, m0
|
|
_, _ = b, x
|
|
x.xxx_hidden_Index = b.Index
|
|
x.xxx_hidden_Fd = b.Fd
|
|
x.xxx_hidden_Rows = b.Rows
|
|
x.xxx_hidden_Cols = b.Cols
|
|
x.xxx_hidden_X = b.X
|
|
x.xxx_hidden_Y = b.Y
|
|
return m0
|
|
}
|
|
|
|
var File_stream_request_proto protoreflect.FileDescriptor
|
|
|
|
const file_stream_request_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\x14stream_request.proto\x12\x02pb\x1a\x1bgoogle/protobuf/empty.proto\x1a\rrequest.proto\x1a!google/protobuf/go_features.proto\"\xb7\x03\n" +
|
|
"\rStreamRequest\x12/\n" +
|
|
"\vexecRequest\x18\x01 \x01(\v2\v.pb.RequestH\x00R\vexecRequest\x127\n" +
|
|
"\texecInput\x18\x02 \x01(\v2\x17.pb.StreamRequest.InputH\x00R\texecInput\x12:\n" +
|
|
"\n" +
|
|
"execResize\x18\x03 \x01(\v2\x18.pb.StreamRequest.ResizeH\x00R\n" +
|
|
"execResize\x128\n" +
|
|
"\n" +
|
|
"execCancel\x18\x04 \x01(\v2\x16.google.protobuf.EmptyH\x00R\n" +
|
|
"execCancel\x1aG\n" +
|
|
"\x05Input\x12\x14\n" +
|
|
"\x05index\x18\x01 \x01(\rR\x05index\x12\x0e\n" +
|
|
"\x02fd\x18\x03 \x01(\rR\x02fd\x12\x18\n" +
|
|
"\acontent\x18\x02 \x01(\fR\acontent\x1ar\n" +
|
|
"\x06Resize\x12\x14\n" +
|
|
"\x05index\x18\x01 \x01(\rR\x05index\x12\x0e\n" +
|
|
"\x02fd\x18\x06 \x01(\rR\x02fd\x12\x12\n" +
|
|
"\x04rows\x18\x02 \x01(\rR\x04rows\x12\x12\n" +
|
|
"\x04cols\x18\x03 \x01(\rR\x04cols\x12\f\n" +
|
|
"\x01x\x18\x04 \x01(\rR\x01x\x12\f\n" +
|
|
"\x01y\x18\x05 \x01(\rR\x01yB\t\n" +
|
|
"\arequestB)Z\x1dgithub.com/criyle/go-judge/pb\x92\x03\a\xd2>\x02\x10\x03\b\x02b\beditionsp\xe8\a"
|
|
|
|
var file_stream_request_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
|
var file_stream_request_proto_goTypes = []any{
|
|
(*StreamRequest)(nil), // 0: pb.StreamRequest
|
|
(*StreamRequest_Input)(nil), // 1: pb.StreamRequest.Input
|
|
(*StreamRequest_Resize)(nil), // 2: pb.StreamRequest.Resize
|
|
(*Request)(nil), // 3: pb.Request
|
|
(*emptypb.Empty)(nil), // 4: google.protobuf.Empty
|
|
}
|
|
var file_stream_request_proto_depIdxs = []int32{
|
|
3, // 0: pb.StreamRequest.execRequest:type_name -> pb.Request
|
|
1, // 1: pb.StreamRequest.execInput:type_name -> pb.StreamRequest.Input
|
|
2, // 2: pb.StreamRequest.execResize:type_name -> pb.StreamRequest.Resize
|
|
4, // 3: pb.StreamRequest.execCancel:type_name -> google.protobuf.Empty
|
|
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_stream_request_proto_init() }
|
|
func file_stream_request_proto_init() {
|
|
if File_stream_request_proto != nil {
|
|
return
|
|
}
|
|
file_request_proto_init()
|
|
file_stream_request_proto_msgTypes[0].OneofWrappers = []any{
|
|
(*streamRequest_ExecRequest)(nil),
|
|
(*streamRequest_ExecInput)(nil),
|
|
(*streamRequest_ExecResize)(nil),
|
|
(*streamRequest_ExecCancel)(nil),
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_stream_request_proto_rawDesc), len(file_stream_request_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 3,
|
|
NumExtensions: 0,
|
|
NumServices: 0,
|
|
},
|
|
GoTypes: file_stream_request_proto_goTypes,
|
|
DependencyIndexes: file_stream_request_proto_depIdxs,
|
|
MessageInfos: file_stream_request_proto_msgTypes,
|
|
}.Build()
|
|
File_stream_request_proto = out.File
|
|
file_stream_request_proto_goTypes = nil
|
|
file_stream_request_proto_depIdxs = nil
|
|
}
|