chore(api)!: updated grpc stubs
This commit is contained in:
@@ -87,10 +87,10 @@ type Submission struct {
|
||||
CompetitionId string `protobuf:"bytes,3,opt,name=competition_id,json=competitionId,proto3" json:"competition_id,omitempty"`
|
||||
TaskId string `protobuf:"bytes,4,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
|
||||
Status SubmissionStatus `protobuf:"varint,5,opt,name=status,proto3,enum=submission.SubmissionStatus" json:"status,omitempty"`
|
||||
EarnedPoints *int32 `protobuf:"varint,6,opt,name=earned_points,json=earnedPoints,proto3,oneof" json:"earned_points,omitempty"`
|
||||
EarnedPoints int32 `protobuf:"varint,6,opt,name=earned_points,json=earnedPoints,proto3" json:"earned_points,omitempty"`
|
||||
SubmittedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=submitted_at,json=submittedAt,proto3" json:"submitted_at,omitempty"`
|
||||
CheckedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=checked_at,json=checkedAt,proto3,oneof" json:"checked_at,omitempty"`
|
||||
Content string `protobuf:"bytes,9,opt,name=content,proto3" json:"content,omitempty"`
|
||||
CheckedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=checked_at,json=checkedAt,proto3" json:"checked_at,omitempty"`
|
||||
FileUrl string `protobuf:"bytes,9,opt,name=file_url,json=fileUrl,proto3" json:"file_url,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -161,8 +161,8 @@ func (x *Submission) GetStatus() SubmissionStatus {
|
||||
}
|
||||
|
||||
func (x *Submission) GetEarnedPoints() int32 {
|
||||
if x != nil && x.EarnedPoints != nil {
|
||||
return *x.EarnedPoints
|
||||
if x != nil {
|
||||
return x.EarnedPoints
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@@ -181,9 +181,9 @@ func (x *Submission) GetCheckedAt() *timestamppb.Timestamp {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Submission) GetContent() string {
|
||||
func (x *Submission) GetFileUrl() string {
|
||||
if x != nil {
|
||||
return x.Content
|
||||
return x.FileUrl
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@@ -192,7 +192,7 @@ type SubmitTaskRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
CompetitionId string `protobuf:"bytes,1,opt,name=competition_id,json=competitionId,proto3" json:"competition_id,omitempty"`
|
||||
TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
|
||||
Content []byte `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
|
||||
FileUrl string `protobuf:"bytes,3,opt,name=file_url,json=fileUrl,proto3" json:"file_url,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -241,11 +241,11 @@ func (x *SubmitTaskRequest) GetTaskId() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SubmitTaskRequest) GetContent() []byte {
|
||||
func (x *SubmitTaskRequest) GetFileUrl() string {
|
||||
if x != nil {
|
||||
return x.Content
|
||||
return x.FileUrl
|
||||
}
|
||||
return nil
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetSubmissionsHistoryRequest struct {
|
||||
@@ -392,10 +392,10 @@ type ListSubmissionsRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
|
||||
PageToken int32 `protobuf:"varint,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
|
||||
CompetitionId *string `protobuf:"bytes,3,opt,name=competition_id,json=competitionId,proto3,oneof" json:"competition_id,omitempty"`
|
||||
TaskId *string `protobuf:"bytes,4,opt,name=task_id,json=taskId,proto3,oneof" json:"task_id,omitempty"`
|
||||
UserId *string `protobuf:"bytes,5,opt,name=user_id,json=userId,proto3,oneof" json:"user_id,omitempty"`
|
||||
Status *SubmissionStatus `protobuf:"varint,6,opt,name=status,proto3,enum=submission.SubmissionStatus,oneof" json:"status,omitempty"`
|
||||
CompetitionId string `protobuf:"bytes,3,opt,name=competition_id,json=competitionId,proto3" json:"competition_id,omitempty"`
|
||||
TaskId string `protobuf:"bytes,4,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
|
||||
UserId string `protobuf:"bytes,5,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
Status SubmissionStatus `protobuf:"varint,6,opt,name=status,proto3,enum=submission.SubmissionStatus" json:"status,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -445,29 +445,29 @@ func (x *ListSubmissionsRequest) GetPageToken() int32 {
|
||||
}
|
||||
|
||||
func (x *ListSubmissionsRequest) GetCompetitionId() string {
|
||||
if x != nil && x.CompetitionId != nil {
|
||||
return *x.CompetitionId
|
||||
if x != nil {
|
||||
return x.CompetitionId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ListSubmissionsRequest) GetTaskId() string {
|
||||
if x != nil && x.TaskId != nil {
|
||||
return *x.TaskId
|
||||
if x != nil {
|
||||
return x.TaskId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ListSubmissionsRequest) GetUserId() string {
|
||||
if x != nil && x.UserId != nil {
|
||||
return *x.UserId
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ListSubmissionsRequest) GetStatus() SubmissionStatus {
|
||||
if x != nil && x.Status != nil {
|
||||
return *x.Status
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return SubmissionStatus_SUBMISSION_STATUS_UNSPECIFIED
|
||||
}
|
||||
@@ -537,46 +537,38 @@ var File_api_proto_submission_proto protoreflect.FileDescriptor
|
||||
const file_api_proto_submission_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x1aapi/proto/submission.proto\x12\n" +
|
||||
"submission\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8f\x03\n" +
|
||||
"submission\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe5\x02\n" +
|
||||
"\n" +
|
||||
"Submission\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\x12\x17\n" +
|
||||
"\auser_id\x18\x02 \x01(\tR\x06userId\x12%\n" +
|
||||
"\x0ecompetition_id\x18\x03 \x01(\tR\rcompetitionId\x12\x17\n" +
|
||||
"\atask_id\x18\x04 \x01(\tR\x06taskId\x124\n" +
|
||||
"\x06status\x18\x05 \x01(\x0e2\x1c.submission.SubmissionStatusR\x06status\x12(\n" +
|
||||
"\rearned_points\x18\x06 \x01(\x05H\x00R\fearnedPoints\x88\x01\x01\x12=\n" +
|
||||
"\fsubmitted_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\vsubmittedAt\x12>\n" +
|
||||
"\x06status\x18\x05 \x01(\x0e2\x1c.submission.SubmissionStatusR\x06status\x12#\n" +
|
||||
"\rearned_points\x18\x06 \x01(\x05R\fearnedPoints\x12=\n" +
|
||||
"\fsubmitted_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\vsubmittedAt\x129\n" +
|
||||
"\n" +
|
||||
"checked_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampH\x01R\tcheckedAt\x88\x01\x01\x12\x18\n" +
|
||||
"\acontent\x18\t \x01(\tR\acontentB\x10\n" +
|
||||
"\x0e_earned_pointsB\r\n" +
|
||||
"\v_checked_at\"m\n" +
|
||||
"checked_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\tcheckedAt\x12\x19\n" +
|
||||
"\bfile_url\x18\t \x01(\tR\afileUrl\"n\n" +
|
||||
"\x11SubmitTaskRequest\x12%\n" +
|
||||
"\x0ecompetition_id\x18\x01 \x01(\tR\rcompetitionId\x12\x17\n" +
|
||||
"\atask_id\x18\x02 \x01(\tR\x06taskId\x12\x18\n" +
|
||||
"\acontent\x18\x03 \x01(\fR\acontent\"^\n" +
|
||||
"\atask_id\x18\x02 \x01(\tR\x06taskId\x12\x19\n" +
|
||||
"\bfile_url\x18\x03 \x01(\tR\afileUrl\"^\n" +
|
||||
"\x1cGetSubmissionsHistoryRequest\x12%\n" +
|
||||
"\x0ecompetition_id\x18\x01 \x01(\tR\rcompetitionId\x12\x17\n" +
|
||||
"\atask_id\x18\x02 \x01(\tR\x06taskId\"Y\n" +
|
||||
"\x1dGetSubmissionsHistoryResponse\x128\n" +
|
||||
"\vsubmissions\x18\x01 \x03(\v2\x16.submission.SubmissionR\vsubmissions\";\n" +
|
||||
"\x14GetSubmissionRequest\x12#\n" +
|
||||
"\rsubmission_id\x18\x01 \x01(\tR\fsubmissionId\"\xad\x02\n" +
|
||||
"\rsubmission_id\x18\x01 \x01(\tR\fsubmissionId\"\xe3\x01\n" +
|
||||
"\x16ListSubmissionsRequest\x12\x1b\n" +
|
||||
"\tpage_size\x18\x01 \x01(\x05R\bpageSize\x12\x1d\n" +
|
||||
"\n" +
|
||||
"page_token\x18\x02 \x01(\x05R\tpageToken\x12*\n" +
|
||||
"\x0ecompetition_id\x18\x03 \x01(\tH\x00R\rcompetitionId\x88\x01\x01\x12\x1c\n" +
|
||||
"\atask_id\x18\x04 \x01(\tH\x01R\x06taskId\x88\x01\x01\x12\x1c\n" +
|
||||
"\auser_id\x18\x05 \x01(\tH\x02R\x06userId\x88\x01\x01\x129\n" +
|
||||
"\x06status\x18\x06 \x01(\x0e2\x1c.submission.SubmissionStatusH\x03R\x06status\x88\x01\x01B\x11\n" +
|
||||
"\x0f_competition_idB\n" +
|
||||
"\n" +
|
||||
"\b_task_idB\n" +
|
||||
"\n" +
|
||||
"\b_user_idB\t\n" +
|
||||
"\a_status\"\x9c\x01\n" +
|
||||
"page_token\x18\x02 \x01(\x05R\tpageToken\x12%\n" +
|
||||
"\x0ecompetition_id\x18\x03 \x01(\tR\rcompetitionId\x12\x17\n" +
|
||||
"\atask_id\x18\x04 \x01(\tR\x06taskId\x12\x17\n" +
|
||||
"\auser_id\x18\x05 \x01(\tR\x06userId\x124\n" +
|
||||
"\x06status\x18\x06 \x01(\x0e2\x1c.submission.SubmissionStatusR\x06status\"\x9c\x01\n" +
|
||||
"\x17ListSubmissionsResponse\x128\n" +
|
||||
"\vsubmissions\x18\x01 \x03(\v2\x16.submission.SubmissionR\vsubmissions\x12\x1f\n" +
|
||||
"\vtotal_count\x18\x02 \x01(\x05R\n" +
|
||||
@@ -648,8 +640,6 @@ func file_api_proto_submission_proto_init() {
|
||||
if File_api_proto_submission_proto != nil {
|
||||
return
|
||||
}
|
||||
file_api_proto_submission_proto_msgTypes[0].OneofWrappers = []any{}
|
||||
file_api_proto_submission_proto_msgTypes[5].OneofWrappers = []any{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
|
||||
+11
-14
@@ -81,8 +81,8 @@ type Task struct {
|
||||
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,oneof" json:"max_points,omitempty"`
|
||||
MaxAttempts *int32 `protobuf:"varint,7,opt,name=max_attempts,json=maxAttempts,proto3,oneof" json:"max_attempts,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"`
|
||||
@@ -156,15 +156,15 @@ func (x *Task) GetInCompetitionPosition() int32 {
|
||||
}
|
||||
|
||||
func (x *Task) GetMaxPoints() int32 {
|
||||
if x != nil && x.MaxPoints != nil {
|
||||
return *x.MaxPoints
|
||||
if x != nil {
|
||||
return x.MaxPoints
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Task) GetMaxAttempts() int32 {
|
||||
if x != nil && x.MaxAttempts != nil {
|
||||
return *x.MaxAttempts
|
||||
if x != nil {
|
||||
return x.MaxAttempts
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@@ -474,24 +474,22 @@ 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\"\xb3\x03\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\"\n" +
|
||||
"\x17in_competition_position\x18\x05 \x01(\x05R\x15inCompetitionPosition\x12\x1d\n" +
|
||||
"\n" +
|
||||
"max_points\x18\x06 \x01(\x05H\x00R\tmaxPoints\x88\x01\x01\x12&\n" +
|
||||
"\fmax_attempts\x18\a \x01(\x05H\x01R\vmaxAttempts\x88\x01\x01\x12\"\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\tupdatedAtB\r\n" +
|
||||
"\v_max_pointsB\x0f\n" +
|
||||
"\r_max_attempts\"X\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" +
|
||||
@@ -567,7 +565,6 @@ func file_api_proto_task_proto_init() {
|
||||
if File_api_proto_task_proto != nil {
|
||||
return
|
||||
}
|
||||
file_api_proto_task_proto_msgTypes[0].OneofWrappers = []any{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
|
||||
Reference in New Issue
Block a user