Files
Datarush/pkg/api/task/task.pb.go
T
2025-12-14 19:38:15 +03:00

587 lines
18 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v6.33.2
// source: api/proto/task.proto
package task
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)
)
type TaskType int32
const (
TaskType_TASK_TYPE_UNSPECIFIED TaskType = 0
TaskType_TASK_TYPE_INPUT TaskType = 1
TaskType_TASK_TYPE_CHECKER TaskType = 2
TaskType_TASK_TYPE_REVIEW TaskType = 3
)
// Enum value maps for TaskType.
var (
TaskType_name = map[int32]string{
0: "TASK_TYPE_UNSPECIFIED",
1: "TASK_TYPE_INPUT",
2: "TASK_TYPE_CHECKER",
3: "TASK_TYPE_REVIEW",
}
TaskType_value = map[string]int32{
"TASK_TYPE_UNSPECIFIED": 0,
"TASK_TYPE_INPUT": 1,
"TASK_TYPE_CHECKER": 2,
"TASK_TYPE_REVIEW": 3,
}
)
func (x TaskType) Enum() *TaskType {
p := new(TaskType)
*p = x
return p
}
func (x TaskType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (TaskType) Descriptor() protoreflect.EnumDescriptor {
return file_api_proto_task_proto_enumTypes[0].Descriptor()
}
func (TaskType) Type() protoreflect.EnumType {
return &file_api_proto_task_proto_enumTypes[0]
}
func (x TaskType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use TaskType.Descriptor instead.
func (TaskType) EnumDescriptor() ([]byte, []int) {
return file_api_proto_task_proto_rawDescGZIP(), []int{0}
}
type Task struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
CompetitionId string `protobuf:"bytes,2,opt,name=competition_id,json=competitionId,proto3" json:"competition_id,omitempty"`
Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
InCompetitionPosition int32 `protobuf:"varint,5,opt,name=in_competition_position,json=inCompetitionPosition,proto3" json:"in_competition_position,omitempty"`
MaxPoints int32 `protobuf:"varint,6,opt,name=max_points,json=maxPoints,proto3" json:"max_points,omitempty"`
MaxAttempts int32 `protobuf:"varint,7,opt,name=max_attempts,json=maxAttempts,proto3" json:"max_attempts,omitempty"`
Type TaskType `protobuf:"varint,8,opt,name=type,proto3,enum=task.TaskType" json:"type,omitempty"`
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Task) Reset() {
*x = Task{}
mi := &file_api_proto_task_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Task) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Task) ProtoMessage() {}
func (x *Task) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_task_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 Task.ProtoReflect.Descriptor instead.
func (*Task) Descriptor() ([]byte, []int) {
return file_api_proto_task_proto_rawDescGZIP(), []int{0}
}
func (x *Task) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Task) GetCompetitionId() string {
if x != nil {
return x.CompetitionId
}
return ""
}
func (x *Task) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *Task) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Task) GetInCompetitionPosition() int32 {
if x != nil {
return x.InCompetitionPosition
}
return 0
}
func (x *Task) GetMaxPoints() int32 {
if x != nil {
return x.MaxPoints
}
return 0
}
func (x *Task) GetMaxAttempts() int32 {
if x != nil {
return x.MaxAttempts
}
return 0
}
func (x *Task) GetType() TaskType {
if x != nil {
return x.Type
}
return TaskType_TASK_TYPE_UNSPECIFIED
}
func (x *Task) GetCreatedAt() *timestamppb.Timestamp {
if x != nil {
return x.CreatedAt
}
return nil
}
func (x *Task) GetUpdatedAt() *timestamppb.Timestamp {
if x != nil {
return x.UpdatedAt
}
return nil
}
type TaskAttachment struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
FileUrl string `protobuf:"bytes,2,opt,name=file_url,json=fileUrl,proto3" json:"file_url,omitempty"`
IsPublic bool `protobuf:"varint,3,opt,name=is_public,json=isPublic,proto3" json:"is_public,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *TaskAttachment) Reset() {
*x = TaskAttachment{}
mi := &file_api_proto_task_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *TaskAttachment) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TaskAttachment) ProtoMessage() {}
func (x *TaskAttachment) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_task_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 TaskAttachment.ProtoReflect.Descriptor instead.
func (*TaskAttachment) Descriptor() ([]byte, []int) {
return file_api_proto_task_proto_rawDescGZIP(), []int{1}
}
func (x *TaskAttachment) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *TaskAttachment) GetFileUrl() string {
if x != nil {
return x.FileUrl
}
return ""
}
func (x *TaskAttachment) GetIsPublic() bool {
if x != nil {
return x.IsPublic
}
return false
}
type GetTaskRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetTaskRequest) Reset() {
*x = GetTaskRequest{}
mi := &file_api_proto_task_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetTaskRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetTaskRequest) ProtoMessage() {}
func (x *GetTaskRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_task_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 GetTaskRequest.ProtoReflect.Descriptor instead.
func (*GetTaskRequest) Descriptor() ([]byte, []int) {
return file_api_proto_task_proto_rawDescGZIP(), []int{2}
}
func (x *GetTaskRequest) GetTaskId() string {
if x != nil {
return x.TaskId
}
return ""
}
type ListCompetitionTasksRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
CompetitionId string `protobuf:"bytes,1,opt,name=competition_id,json=competitionId,proto3" json:"competition_id,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ListCompetitionTasksRequest) Reset() {
*x = ListCompetitionTasksRequest{}
mi := &file_api_proto_task_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ListCompetitionTasksRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListCompetitionTasksRequest) ProtoMessage() {}
func (x *ListCompetitionTasksRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_task_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 ListCompetitionTasksRequest.ProtoReflect.Descriptor instead.
func (*ListCompetitionTasksRequest) Descriptor() ([]byte, []int) {
return file_api_proto_task_proto_rawDescGZIP(), []int{3}
}
func (x *ListCompetitionTasksRequest) GetCompetitionId() string {
if x != nil {
return x.CompetitionId
}
return ""
}
type ListCompetitionTasksResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Tasks []*Task `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ListCompetitionTasksResponse) Reset() {
*x = ListCompetitionTasksResponse{}
mi := &file_api_proto_task_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ListCompetitionTasksResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListCompetitionTasksResponse) ProtoMessage() {}
func (x *ListCompetitionTasksResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_task_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 ListCompetitionTasksResponse.ProtoReflect.Descriptor instead.
func (*ListCompetitionTasksResponse) Descriptor() ([]byte, []int) {
return file_api_proto_task_proto_rawDescGZIP(), []int{4}
}
func (x *ListCompetitionTasksResponse) GetTasks() []*Task {
if x != nil {
return x.Tasks
}
return nil
}
type GetTaskAttachmentsRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetTaskAttachmentsRequest) Reset() {
*x = GetTaskAttachmentsRequest{}
mi := &file_api_proto_task_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetTaskAttachmentsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetTaskAttachmentsRequest) ProtoMessage() {}
func (x *GetTaskAttachmentsRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_task_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 GetTaskAttachmentsRequest.ProtoReflect.Descriptor instead.
func (*GetTaskAttachmentsRequest) Descriptor() ([]byte, []int) {
return file_api_proto_task_proto_rawDescGZIP(), []int{5}
}
func (x *GetTaskAttachmentsRequest) GetTaskId() string {
if x != nil {
return x.TaskId
}
return ""
}
type GetTaskAttachmentsResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Attachments []*TaskAttachment `protobuf:"bytes,1,rep,name=attachments,proto3" json:"attachments,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetTaskAttachmentsResponse) Reset() {
*x = GetTaskAttachmentsResponse{}
mi := &file_api_proto_task_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetTaskAttachmentsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetTaskAttachmentsResponse) ProtoMessage() {}
func (x *GetTaskAttachmentsResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_task_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 GetTaskAttachmentsResponse.ProtoReflect.Descriptor instead.
func (*GetTaskAttachmentsResponse) Descriptor() ([]byte, []int) {
return file_api_proto_task_proto_rawDescGZIP(), []int{6}
}
func (x *GetTaskAttachmentsResponse) GetAttachments() []*TaskAttachment {
if x != nil {
return x.Attachments
}
return nil
}
var File_api_proto_task_proto protoreflect.FileDescriptor
const file_api_proto_task_proto_rawDesc = "" +
"\n" +
"\x14api/proto/task.proto\x12\x04task\x1a\x1fgoogle/protobuf/timestamp.proto\"\x89\x03\n" +
"\x04Task\x12\x0e\n" +
"\x02id\x18\x01 \x01(\tR\x02id\x12%\n" +
"\x0ecompetition_id\x18\x02 \x01(\tR\rcompetitionId\x12\x14\n" +
"\x05title\x18\x03 \x01(\tR\x05title\x12 \n" +
"\vdescription\x18\x04 \x01(\tR\vdescription\x126\n" +
"\x17in_competition_position\x18\x05 \x01(\x05R\x15inCompetitionPosition\x12\x1d\n" +
"\n" +
"max_points\x18\x06 \x01(\x05R\tmaxPoints\x12!\n" +
"\fmax_attempts\x18\a \x01(\x05R\vmaxAttempts\x12\"\n" +
"\x04type\x18\b \x01(\x0e2\x0e.task.TaskTypeR\x04type\x129\n" +
"\n" +
"created_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" +
"\n" +
"updated_at\x18\n" +
" \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"X\n" +
"\x0eTaskAttachment\x12\x0e\n" +
"\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n" +
"\bfile_url\x18\x02 \x01(\tR\afileUrl\x12\x1b\n" +
"\tis_public\x18\x03 \x01(\bR\bisPublic\")\n" +
"\x0eGetTaskRequest\x12\x17\n" +
"\atask_id\x18\x01 \x01(\tR\x06taskId\"D\n" +
"\x1bListCompetitionTasksRequest\x12%\n" +
"\x0ecompetition_id\x18\x01 \x01(\tR\rcompetitionId\"@\n" +
"\x1cListCompetitionTasksResponse\x12 \n" +
"\x05tasks\x18\x01 \x03(\v2\n" +
".task.TaskR\x05tasks\"4\n" +
"\x19GetTaskAttachmentsRequest\x12\x17\n" +
"\atask_id\x18\x01 \x01(\tR\x06taskId\"T\n" +
"\x1aGetTaskAttachmentsResponse\x126\n" +
"\vattachments\x18\x01 \x03(\v2\x14.task.TaskAttachmentR\vattachments*g\n" +
"\bTaskType\x12\x19\n" +
"\x15TASK_TYPE_UNSPECIFIED\x10\x00\x12\x13\n" +
"\x0fTASK_TYPE_INPUT\x10\x01\x12\x15\n" +
"\x11TASK_TYPE_CHECKER\x10\x02\x12\x14\n" +
"\x10TASK_TYPE_REVIEW\x10\x032\xf2\x01\n" +
"\vTaskService\x12+\n" +
"\aGetTask\x12\x14.task.GetTaskRequest\x1a\n" +
".task.Task\x12]\n" +
"\x14ListCompetitionTasks\x12!.task.ListCompetitionTasksRequest\x1a\".task.ListCompetitionTasksResponse\x12W\n" +
"\x12GetTaskAttachments\x12\x1f.task.GetTaskAttachmentsRequest\x1a .task.GetTaskAttachmentsResponseB\x0eZ\fpkg/api/taskb\x06proto3"
var (
file_api_proto_task_proto_rawDescOnce sync.Once
file_api_proto_task_proto_rawDescData []byte
)
func file_api_proto_task_proto_rawDescGZIP() []byte {
file_api_proto_task_proto_rawDescOnce.Do(func() {
file_api_proto_task_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_api_proto_task_proto_rawDesc), len(file_api_proto_task_proto_rawDesc)))
})
return file_api_proto_task_proto_rawDescData
}
var file_api_proto_task_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_api_proto_task_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_api_proto_task_proto_goTypes = []any{
(TaskType)(0), // 0: task.TaskType
(*Task)(nil), // 1: task.Task
(*TaskAttachment)(nil), // 2: task.TaskAttachment
(*GetTaskRequest)(nil), // 3: task.GetTaskRequest
(*ListCompetitionTasksRequest)(nil), // 4: task.ListCompetitionTasksRequest
(*ListCompetitionTasksResponse)(nil), // 5: task.ListCompetitionTasksResponse
(*GetTaskAttachmentsRequest)(nil), // 6: task.GetTaskAttachmentsRequest
(*GetTaskAttachmentsResponse)(nil), // 7: task.GetTaskAttachmentsResponse
(*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp
}
var file_api_proto_task_proto_depIdxs = []int32{
0, // 0: task.Task.type:type_name -> task.TaskType
8, // 1: task.Task.created_at:type_name -> google.protobuf.Timestamp
8, // 2: task.Task.updated_at:type_name -> google.protobuf.Timestamp
1, // 3: task.ListCompetitionTasksResponse.tasks:type_name -> task.Task
2, // 4: task.GetTaskAttachmentsResponse.attachments:type_name -> task.TaskAttachment
3, // 5: task.TaskService.GetTask:input_type -> task.GetTaskRequest
4, // 6: task.TaskService.ListCompetitionTasks:input_type -> task.ListCompetitionTasksRequest
6, // 7: task.TaskService.GetTaskAttachments:input_type -> task.GetTaskAttachmentsRequest
1, // 8: task.TaskService.GetTask:output_type -> task.Task
5, // 9: task.TaskService.ListCompetitionTasks:output_type -> task.ListCompetitionTasksResponse
7, // 10: task.TaskService.GetTaskAttachments:output_type -> task.GetTaskAttachmentsResponse
8, // [8:11] is the sub-list for method output_type
5, // [5:8] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_api_proto_task_proto_init() }
func file_api_proto_task_proto_init() {
if File_api_proto_task_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_api_proto_task_proto_rawDesc), len(file_api_proto_task_proto_rawDesc)),
NumEnums: 1,
NumMessages: 7,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_api_proto_task_proto_goTypes,
DependencyIndexes: file_api_proto_task_proto_depIdxs,
EnumInfos: file_api_proto_task_proto_enumTypes,
MessageInfos: file_api_proto_task_proto_msgTypes,
}.Build()
File_api_proto_task_proto = out.File
file_api_proto_task_proto_goTypes = nil
file_api_proto_task_proto_depIdxs = nil
}