@fivenet-app/gen 0.9.3-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/google/protobuf/any.ts +322 -0
- package/google/protobuf/descriptor.ts +3475 -0
- package/google/protobuf/duration.ts +231 -0
- package/google/protobuf/timestamp.ts +290 -0
- package/package.json +15 -0
- package/perms.ts +178 -0
- package/resources/accounts/accounts.ts +195 -0
- package/resources/accounts/oauth2.ts +230 -0
- package/resources/calendar/access.ts +362 -0
- package/resources/calendar/calendar.ts +955 -0
- package/resources/centrum/access.ts +380 -0
- package/resources/centrum/dispatches.ts +854 -0
- package/resources/centrum/general.ts +231 -0
- package/resources/centrum/settings.ts +303 -0
- package/resources/centrum/units.ts +620 -0
- package/resources/common/access/dummy.ts +309 -0
- package/resources/common/content/content.ts +252 -0
- package/resources/common/cron/cron.ts +536 -0
- package/resources/common/database/database.ts +306 -0
- package/resources/common/error.ts +79 -0
- package/resources/common/grpcws/grpcws.ts +615 -0
- package/resources/common/i18n.ts +102 -0
- package/resources/common/uuid.ts +68 -0
- package/resources/documents/access.ts +388 -0
- package/resources/documents/activity.ts +803 -0
- package/resources/documents/category.ts +132 -0
- package/resources/documents/comment.ts +161 -0
- package/resources/documents/documents.ts +1124 -0
- package/resources/documents/requests.ts +196 -0
- package/resources/documents/templates.ts +949 -0
- package/resources/documents/workflow.ts +349 -0
- package/resources/filestore/file.ts +204 -0
- package/resources/internet/ads.ts +257 -0
- package/resources/internet/domain.ts +136 -0
- package/resources/internet/internet.ts +344 -0
- package/resources/internet/page.ts +236 -0
- package/resources/internet/search.ts +104 -0
- package/resources/jobs/activity.ts +600 -0
- package/resources/jobs/colleagues.ts +346 -0
- package/resources/jobs/conduct.ts +220 -0
- package/resources/jobs/labels.ts +240 -0
- package/resources/jobs/timeclock.ts +372 -0
- package/resources/laws/laws.ts +293 -0
- package/resources/livemap/livemap.ts +728 -0
- package/resources/livemap/tracker.ts +81 -0
- package/resources/mailer/access.ts +485 -0
- package/resources/mailer/email.ts +222 -0
- package/resources/mailer/events.ts +196 -0
- package/resources/mailer/message.ts +285 -0
- package/resources/mailer/settings.ts +95 -0
- package/resources/mailer/template.ts +164 -0
- package/resources/mailer/thread.ts +422 -0
- package/resources/mailer/user.ts +93 -0
- package/resources/notifications/events.ts +287 -0
- package/resources/notifications/notifications.ts +444 -0
- package/resources/permissions/permissions.ts +829 -0
- package/resources/qualifications/access.ts +275 -0
- package/resources/qualifications/exam.ts +1421 -0
- package/resources/qualifications/qualifications.ts +1289 -0
- package/resources/rector/audit.ts +226 -0
- package/resources/rector/config.ts +922 -0
- package/resources/stats/stats.ts +67 -0
- package/resources/sync/activity.ts +356 -0
- package/resources/sync/data.ts +455 -0
- package/resources/timestamp/timestamp.ts +78 -0
- package/resources/users/activity.ts +211 -0
- package/resources/users/job_props.ts +992 -0
- package/resources/users/jobs.ts +171 -0
- package/resources/users/labels.ts +161 -0
- package/resources/users/props.ts +207 -0
- package/resources/users/users.ts +570 -0
- package/resources/vehicles/vehicles.ts +114 -0
- package/resources/wiki/access.ts +362 -0
- package/resources/wiki/activity.ts +591 -0
- package/resources/wiki/page.ts +548 -0
- package/services/auth/auth.client.ts +171 -0
- package/services/auth/auth.ts +1331 -0
- package/services/calendar/calendar.client.ts +262 -0
- package/services/calendar/calendar.ts +1733 -0
- package/services/centrum/centrum.client.ts +365 -0
- package/services/centrum/centrum.ts +2619 -0
- package/services/citizenstore/citizenstore.client.ts +126 -0
- package/services/citizenstore/citizenstore.ts +847 -0
- package/services/completor/completor.client.ts +109 -0
- package/services/completor/completor.ts +616 -0
- package/services/dmv/vehicles.client.ts +41 -0
- package/services/dmv/vehicles.ts +191 -0
- package/services/docstore/docstore.client.ts +653 -0
- package/services/docstore/docstore.ts +4571 -0
- package/services/internet/ads.client.ts +41 -0
- package/services/internet/ads.ts +145 -0
- package/services/internet/internet.client.ts +58 -0
- package/services/internet/internet.ts +257 -0
- package/services/jobs/conduct.client.ts +92 -0
- package/services/jobs/conduct.ts +541 -0
- package/services/jobs/jobs.client.ts +194 -0
- package/services/jobs/jobs.ts +1301 -0
- package/services/jobs/timeclock.client.ts +75 -0
- package/services/jobs/timeclock.ts +808 -0
- package/services/livemapper/livemap.client.ts +76 -0
- package/services/livemapper/livemap.ts +552 -0
- package/services/mailer/mailer.client.ts +381 -0
- package/services/mailer/mailer.ts +2590 -0
- package/services/notificator/notificator.client.ts +76 -0
- package/services/notificator/notificator.ts +510 -0
- package/services/qualifications/qualifications.client.ts +279 -0
- package/services/qualifications/qualifications.ts +2142 -0
- package/services/rector/config.client.ts +58 -0
- package/services/rector/config.ts +216 -0
- package/services/rector/filestore.client.ts +75 -0
- package/services/rector/filestore.ts +378 -0
- package/services/rector/laws.client.ts +92 -0
- package/services/rector/laws.ts +416 -0
- package/services/rector/rector.client.ts +211 -0
- package/services/rector/rector.ts +1540 -0
- package/services/stats/stats.client.ts +37 -0
- package/services/stats/stats.ts +128 -0
- package/services/sync/sync.client.ts +110 -0
- package/services/sync/sync.ts +831 -0
- package/services/wiki/wiki.client.ts +126 -0
- package/services/wiki/wiki.ts +749 -0
- package/svcs.ts +307 -0
|
@@ -0,0 +1,1421 @@
|
|
|
1
|
+
// @generated by protobuf-ts 2.9.4 with parameter optimize_speed,long_type_number,force_server_none
|
|
2
|
+
// @generated from protobuf file "resources/qualifications/exam.proto" (package "resources.qualifications", syntax proto3)
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
5
|
+
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
6
|
+
import { WireType } from "@protobuf-ts/runtime";
|
|
7
|
+
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
8
|
+
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
9
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
10
|
+
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
11
|
+
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
12
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
13
|
+
import { File } from "../filestore/file";
|
|
14
|
+
import { Timestamp } from "../timestamp/timestamp";
|
|
15
|
+
// Exam / Questions
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @generated from protobuf message resources.qualifications.ExamQuestions
|
|
19
|
+
*/
|
|
20
|
+
export interface ExamQuestions {
|
|
21
|
+
/**
|
|
22
|
+
* @generated from protobuf field: repeated resources.qualifications.ExamQuestion questions = 1;
|
|
23
|
+
*/
|
|
24
|
+
questions: ExamQuestion[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @generated from protobuf message resources.qualifications.ExamQuestion
|
|
28
|
+
*/
|
|
29
|
+
export interface ExamQuestion {
|
|
30
|
+
/**
|
|
31
|
+
* @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
|
|
32
|
+
*/
|
|
33
|
+
id: string;
|
|
34
|
+
/**
|
|
35
|
+
* @generated from protobuf field: uint64 qualification_id = 2 [jstype = JS_STRING];
|
|
36
|
+
*/
|
|
37
|
+
qualificationId: string;
|
|
38
|
+
/**
|
|
39
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 3;
|
|
40
|
+
*/
|
|
41
|
+
createdAt?: Timestamp;
|
|
42
|
+
/**
|
|
43
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 4;
|
|
44
|
+
*/
|
|
45
|
+
updatedAt?: Timestamp;
|
|
46
|
+
/**
|
|
47
|
+
* @sanitize: method=StripTags
|
|
48
|
+
*
|
|
49
|
+
* @generated from protobuf field: string title = 5;
|
|
50
|
+
*/
|
|
51
|
+
title: string;
|
|
52
|
+
/**
|
|
53
|
+
* @sanitize: method=StripTags
|
|
54
|
+
*
|
|
55
|
+
* @generated from protobuf field: optional string description = 6;
|
|
56
|
+
*/
|
|
57
|
+
description?: string;
|
|
58
|
+
/**
|
|
59
|
+
* @generated from protobuf field: resources.qualifications.ExamQuestionData data = 7;
|
|
60
|
+
*/
|
|
61
|
+
data?: ExamQuestionData;
|
|
62
|
+
/**
|
|
63
|
+
* @generated from protobuf field: optional resources.qualifications.ExamQuestionAnswerData answer = 8;
|
|
64
|
+
*/
|
|
65
|
+
answer?: ExamQuestionAnswerData;
|
|
66
|
+
/**
|
|
67
|
+
* @generated from protobuf field: optional int32 points = 9;
|
|
68
|
+
*/
|
|
69
|
+
points?: number;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* @generated from protobuf message resources.qualifications.ExamQuestionData
|
|
73
|
+
*/
|
|
74
|
+
export interface ExamQuestionData {
|
|
75
|
+
/**
|
|
76
|
+
* @generated from protobuf oneof: data
|
|
77
|
+
*/
|
|
78
|
+
data: {
|
|
79
|
+
oneofKind: "separator";
|
|
80
|
+
/**
|
|
81
|
+
* @generated from protobuf field: resources.qualifications.ExamQuestionSeparator separator = 1;
|
|
82
|
+
*/
|
|
83
|
+
separator: ExamQuestionSeparator;
|
|
84
|
+
} | {
|
|
85
|
+
oneofKind: "image";
|
|
86
|
+
/**
|
|
87
|
+
* @generated from protobuf field: resources.qualifications.ExamQuestionImage image = 6;
|
|
88
|
+
*/
|
|
89
|
+
image: ExamQuestionImage;
|
|
90
|
+
} | {
|
|
91
|
+
oneofKind: "yesno";
|
|
92
|
+
/**
|
|
93
|
+
* @generated from protobuf field: resources.qualifications.ExamQuestionYesNo yesno = 2;
|
|
94
|
+
*/
|
|
95
|
+
yesno: ExamQuestionYesNo;
|
|
96
|
+
} | {
|
|
97
|
+
oneofKind: "freeText";
|
|
98
|
+
/**
|
|
99
|
+
* @generated from protobuf field: resources.qualifications.ExamQuestionText free_text = 3;
|
|
100
|
+
*/
|
|
101
|
+
freeText: ExamQuestionText;
|
|
102
|
+
} | {
|
|
103
|
+
oneofKind: "singleChoice";
|
|
104
|
+
/**
|
|
105
|
+
* @generated from protobuf field: resources.qualifications.ExamQuestionSingleChoice single_choice = 4;
|
|
106
|
+
*/
|
|
107
|
+
singleChoice: ExamQuestionSingleChoice;
|
|
108
|
+
} | {
|
|
109
|
+
oneofKind: "multipleChoice";
|
|
110
|
+
/**
|
|
111
|
+
* @generated from protobuf field: resources.qualifications.ExamQuestionMultipleChoice multiple_choice = 5;
|
|
112
|
+
*/
|
|
113
|
+
multipleChoice: ExamQuestionMultipleChoice;
|
|
114
|
+
} | {
|
|
115
|
+
oneofKind: undefined;
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* @generated from protobuf message resources.qualifications.ExamQuestionSeparator
|
|
120
|
+
*/
|
|
121
|
+
export interface ExamQuestionSeparator {
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* @generated from protobuf message resources.qualifications.ExamQuestionImage
|
|
125
|
+
*/
|
|
126
|
+
export interface ExamQuestionImage {
|
|
127
|
+
/**
|
|
128
|
+
* @generated from protobuf field: resources.filestore.File image = 1;
|
|
129
|
+
*/
|
|
130
|
+
image?: File;
|
|
131
|
+
/**
|
|
132
|
+
* @generated from protobuf field: optional string alt = 2;
|
|
133
|
+
*/
|
|
134
|
+
alt?: string;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* @generated from protobuf message resources.qualifications.ExamQuestionYesNo
|
|
138
|
+
*/
|
|
139
|
+
export interface ExamQuestionYesNo {
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* @generated from protobuf message resources.qualifications.ExamQuestionText
|
|
143
|
+
*/
|
|
144
|
+
export interface ExamQuestionText {
|
|
145
|
+
/**
|
|
146
|
+
* @generated from protobuf field: int32 min_length = 1;
|
|
147
|
+
*/
|
|
148
|
+
minLength: number;
|
|
149
|
+
/**
|
|
150
|
+
* @generated from protobuf field: int32 max_length = 2;
|
|
151
|
+
*/
|
|
152
|
+
maxLength: number;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* @generated from protobuf message resources.qualifications.ExamQuestionSingleChoice
|
|
156
|
+
*/
|
|
157
|
+
export interface ExamQuestionSingleChoice {
|
|
158
|
+
/**
|
|
159
|
+
* @sanitize: method=StripTags
|
|
160
|
+
*
|
|
161
|
+
* @generated from protobuf field: repeated string choices = 1;
|
|
162
|
+
*/
|
|
163
|
+
choices: string[];
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* @generated from protobuf message resources.qualifications.ExamQuestionMultipleChoice
|
|
167
|
+
*/
|
|
168
|
+
export interface ExamQuestionMultipleChoice {
|
|
169
|
+
/**
|
|
170
|
+
* @sanitize: method=StripTags
|
|
171
|
+
*
|
|
172
|
+
* @generated from protobuf field: repeated string choices = 1;
|
|
173
|
+
*/
|
|
174
|
+
choices: string[];
|
|
175
|
+
/**
|
|
176
|
+
* @generated from protobuf field: optional int32 limit = 2;
|
|
177
|
+
*/
|
|
178
|
+
limit?: number;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* @generated from protobuf message resources.qualifications.ExamQuestionAnswerData
|
|
182
|
+
*/
|
|
183
|
+
export interface ExamQuestionAnswerData {
|
|
184
|
+
/**
|
|
185
|
+
* @generated from protobuf field: string answer_key = 1;
|
|
186
|
+
*/
|
|
187
|
+
answerKey: string;
|
|
188
|
+
}
|
|
189
|
+
// User Response
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* @generated from protobuf message resources.qualifications.ExamUser
|
|
193
|
+
*/
|
|
194
|
+
export interface ExamUser {
|
|
195
|
+
/**
|
|
196
|
+
* @generated from protobuf field: uint64 qualification_id = 1 [jstype = JS_STRING];
|
|
197
|
+
*/
|
|
198
|
+
qualificationId: string;
|
|
199
|
+
/**
|
|
200
|
+
* @generated from protobuf field: int32 user_id = 2;
|
|
201
|
+
*/
|
|
202
|
+
userId: number;
|
|
203
|
+
/**
|
|
204
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 3;
|
|
205
|
+
*/
|
|
206
|
+
createdAt?: Timestamp;
|
|
207
|
+
/**
|
|
208
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp started_at = 4;
|
|
209
|
+
*/
|
|
210
|
+
startedAt?: Timestamp;
|
|
211
|
+
/**
|
|
212
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp ends_at = 5;
|
|
213
|
+
*/
|
|
214
|
+
endsAt?: Timestamp;
|
|
215
|
+
/**
|
|
216
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp ended_at = 6;
|
|
217
|
+
*/
|
|
218
|
+
endedAt?: Timestamp;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* @generated from protobuf message resources.qualifications.ExamResponses
|
|
222
|
+
*/
|
|
223
|
+
export interface ExamResponses {
|
|
224
|
+
/**
|
|
225
|
+
* @generated from protobuf field: uint64 qualification_id = 1 [jstype = JS_STRING];
|
|
226
|
+
*/
|
|
227
|
+
qualificationId: string;
|
|
228
|
+
/**
|
|
229
|
+
* @generated from protobuf field: int32 user_id = 2;
|
|
230
|
+
*/
|
|
231
|
+
userId: number;
|
|
232
|
+
/**
|
|
233
|
+
* @generated from protobuf field: repeated resources.qualifications.ExamResponse responses = 3;
|
|
234
|
+
*/
|
|
235
|
+
responses: ExamResponse[];
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* @generated from protobuf message resources.qualifications.ExamResponse
|
|
239
|
+
*/
|
|
240
|
+
export interface ExamResponse {
|
|
241
|
+
/**
|
|
242
|
+
* @generated from protobuf field: uint64 question_id = 1 [jstype = JS_STRING];
|
|
243
|
+
*/
|
|
244
|
+
questionId: string;
|
|
245
|
+
/**
|
|
246
|
+
* @generated from protobuf field: int32 user_id = 2;
|
|
247
|
+
*/
|
|
248
|
+
userId: number;
|
|
249
|
+
/**
|
|
250
|
+
* @generated from protobuf field: resources.qualifications.ExamQuestion question = 3;
|
|
251
|
+
*/
|
|
252
|
+
question?: ExamQuestion;
|
|
253
|
+
/**
|
|
254
|
+
* @generated from protobuf field: resources.qualifications.ExamResponseData response = 4;
|
|
255
|
+
*/
|
|
256
|
+
response?: ExamResponseData;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* @generated from protobuf message resources.qualifications.ExamResponseData
|
|
260
|
+
*/
|
|
261
|
+
export interface ExamResponseData {
|
|
262
|
+
/**
|
|
263
|
+
* @generated from protobuf oneof: response
|
|
264
|
+
*/
|
|
265
|
+
response: {
|
|
266
|
+
oneofKind: "separator";
|
|
267
|
+
/**
|
|
268
|
+
* @generated from protobuf field: resources.qualifications.ExamResponseSeparator separator = 3;
|
|
269
|
+
*/
|
|
270
|
+
separator: ExamResponseSeparator;
|
|
271
|
+
} | {
|
|
272
|
+
oneofKind: "yesno";
|
|
273
|
+
/**
|
|
274
|
+
* @generated from protobuf field: resources.qualifications.ExamResponseYesNo yesno = 4;
|
|
275
|
+
*/
|
|
276
|
+
yesno: ExamResponseYesNo;
|
|
277
|
+
} | {
|
|
278
|
+
oneofKind: "freeText";
|
|
279
|
+
/**
|
|
280
|
+
* @generated from protobuf field: resources.qualifications.ExamResponseText free_text = 5;
|
|
281
|
+
*/
|
|
282
|
+
freeText: ExamResponseText;
|
|
283
|
+
} | {
|
|
284
|
+
oneofKind: "singleChoice";
|
|
285
|
+
/**
|
|
286
|
+
* @generated from protobuf field: resources.qualifications.ExamResponseSingleChoice single_choice = 6;
|
|
287
|
+
*/
|
|
288
|
+
singleChoice: ExamResponseSingleChoice;
|
|
289
|
+
} | {
|
|
290
|
+
oneofKind: "multipleChoice";
|
|
291
|
+
/**
|
|
292
|
+
* @generated from protobuf field: resources.qualifications.ExamResponseMultipleChoice multiple_choice = 7;
|
|
293
|
+
*/
|
|
294
|
+
multipleChoice: ExamResponseMultipleChoice;
|
|
295
|
+
} | {
|
|
296
|
+
oneofKind: undefined;
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* @generated from protobuf message resources.qualifications.ExamResponseSeparator
|
|
301
|
+
*/
|
|
302
|
+
export interface ExamResponseSeparator {
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* @generated from protobuf message resources.qualifications.ExamResponseYesNo
|
|
306
|
+
*/
|
|
307
|
+
export interface ExamResponseYesNo {
|
|
308
|
+
/**
|
|
309
|
+
* @generated from protobuf field: bool value = 1;
|
|
310
|
+
*/
|
|
311
|
+
value: boolean;
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* @generated from protobuf message resources.qualifications.ExamResponseText
|
|
315
|
+
*/
|
|
316
|
+
export interface ExamResponseText {
|
|
317
|
+
/**
|
|
318
|
+
* @sanitize: method=StripTags
|
|
319
|
+
*
|
|
320
|
+
* @generated from protobuf field: string text = 1;
|
|
321
|
+
*/
|
|
322
|
+
text: string; // 0.5 Megabyte
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* @generated from protobuf message resources.qualifications.ExamResponseSingleChoice
|
|
326
|
+
*/
|
|
327
|
+
export interface ExamResponseSingleChoice {
|
|
328
|
+
/**
|
|
329
|
+
* @sanitize: method=StripTags
|
|
330
|
+
*
|
|
331
|
+
* @generated from protobuf field: string choice = 1;
|
|
332
|
+
*/
|
|
333
|
+
choice: string;
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* @generated from protobuf message resources.qualifications.ExamResponseMultipleChoice
|
|
337
|
+
*/
|
|
338
|
+
export interface ExamResponseMultipleChoice {
|
|
339
|
+
/**
|
|
340
|
+
* @sanitize: method=StripTags
|
|
341
|
+
*
|
|
342
|
+
* @generated from protobuf field: repeated string choices = 1;
|
|
343
|
+
*/
|
|
344
|
+
choices: string[];
|
|
345
|
+
}
|
|
346
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
347
|
+
class ExamQuestions$Type extends MessageType<ExamQuestions> {
|
|
348
|
+
constructor() {
|
|
349
|
+
super("resources.qualifications.ExamQuestions", [
|
|
350
|
+
{ no: 1, name: "questions", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => ExamQuestion, options: { "validate.rules": { repeated: { maxItems: "50" } } } }
|
|
351
|
+
]);
|
|
352
|
+
}
|
|
353
|
+
create(value?: PartialMessage<ExamQuestions>): ExamQuestions {
|
|
354
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
355
|
+
message.questions = [];
|
|
356
|
+
if (value !== undefined)
|
|
357
|
+
reflectionMergePartial<ExamQuestions>(this, message, value);
|
|
358
|
+
return message;
|
|
359
|
+
}
|
|
360
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExamQuestions): ExamQuestions {
|
|
361
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
362
|
+
while (reader.pos < end) {
|
|
363
|
+
let [fieldNo, wireType] = reader.tag();
|
|
364
|
+
switch (fieldNo) {
|
|
365
|
+
case /* repeated resources.qualifications.ExamQuestion questions */ 1:
|
|
366
|
+
message.questions.push(ExamQuestion.internalBinaryRead(reader, reader.uint32(), options));
|
|
367
|
+
break;
|
|
368
|
+
default:
|
|
369
|
+
let u = options.readUnknownField;
|
|
370
|
+
if (u === "throw")
|
|
371
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
372
|
+
let d = reader.skip(wireType);
|
|
373
|
+
if (u !== false)
|
|
374
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
return message;
|
|
378
|
+
}
|
|
379
|
+
internalBinaryWrite(message: ExamQuestions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
380
|
+
/* repeated resources.qualifications.ExamQuestion questions = 1; */
|
|
381
|
+
for (let i = 0; i < message.questions.length; i++)
|
|
382
|
+
ExamQuestion.internalBinaryWrite(message.questions[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
383
|
+
let u = options.writeUnknownFields;
|
|
384
|
+
if (u !== false)
|
|
385
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
386
|
+
return writer;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* @generated MessageType for protobuf message resources.qualifications.ExamQuestions
|
|
391
|
+
*/
|
|
392
|
+
export const ExamQuestions = new ExamQuestions$Type();
|
|
393
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
394
|
+
class ExamQuestion$Type extends MessageType<ExamQuestion> {
|
|
395
|
+
constructor() {
|
|
396
|
+
super("resources.qualifications.ExamQuestion", [
|
|
397
|
+
{ no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
398
|
+
{ no: 2, name: "qualification_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
399
|
+
{ no: 3, name: "created_at", kind: "message", T: () => Timestamp },
|
|
400
|
+
{ no: 4, name: "updated_at", kind: "message", T: () => Timestamp },
|
|
401
|
+
{ no: 5, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3", maxLen: "512" } } } },
|
|
402
|
+
{ no: 6, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "1024" } } } },
|
|
403
|
+
{ no: 7, name: "data", kind: "message", T: () => ExamQuestionData, options: { "validate.rules": { message: { required: true } } } },
|
|
404
|
+
{ no: 8, name: "answer", kind: "message", T: () => ExamQuestionAnswerData },
|
|
405
|
+
{ no: 9, name: "points", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gte: 0 } } } }
|
|
406
|
+
]);
|
|
407
|
+
}
|
|
408
|
+
create(value?: PartialMessage<ExamQuestion>): ExamQuestion {
|
|
409
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
410
|
+
message.id = "0";
|
|
411
|
+
message.qualificationId = "0";
|
|
412
|
+
message.title = "";
|
|
413
|
+
if (value !== undefined)
|
|
414
|
+
reflectionMergePartial<ExamQuestion>(this, message, value);
|
|
415
|
+
return message;
|
|
416
|
+
}
|
|
417
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExamQuestion): ExamQuestion {
|
|
418
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
419
|
+
while (reader.pos < end) {
|
|
420
|
+
let [fieldNo, wireType] = reader.tag();
|
|
421
|
+
switch (fieldNo) {
|
|
422
|
+
case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
|
|
423
|
+
message.id = reader.uint64().toString();
|
|
424
|
+
break;
|
|
425
|
+
case /* uint64 qualification_id = 2 [jstype = JS_STRING];*/ 2:
|
|
426
|
+
message.qualificationId = reader.uint64().toString();
|
|
427
|
+
break;
|
|
428
|
+
case /* optional resources.timestamp.Timestamp created_at */ 3:
|
|
429
|
+
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
430
|
+
break;
|
|
431
|
+
case /* optional resources.timestamp.Timestamp updated_at */ 4:
|
|
432
|
+
message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
|
|
433
|
+
break;
|
|
434
|
+
case /* string title */ 5:
|
|
435
|
+
message.title = reader.string();
|
|
436
|
+
break;
|
|
437
|
+
case /* optional string description */ 6:
|
|
438
|
+
message.description = reader.string();
|
|
439
|
+
break;
|
|
440
|
+
case /* resources.qualifications.ExamQuestionData data */ 7:
|
|
441
|
+
message.data = ExamQuestionData.internalBinaryRead(reader, reader.uint32(), options, message.data);
|
|
442
|
+
break;
|
|
443
|
+
case /* optional resources.qualifications.ExamQuestionAnswerData answer */ 8:
|
|
444
|
+
message.answer = ExamQuestionAnswerData.internalBinaryRead(reader, reader.uint32(), options, message.answer);
|
|
445
|
+
break;
|
|
446
|
+
case /* optional int32 points */ 9:
|
|
447
|
+
message.points = reader.int32();
|
|
448
|
+
break;
|
|
449
|
+
default:
|
|
450
|
+
let u = options.readUnknownField;
|
|
451
|
+
if (u === "throw")
|
|
452
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
453
|
+
let d = reader.skip(wireType);
|
|
454
|
+
if (u !== false)
|
|
455
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
return message;
|
|
459
|
+
}
|
|
460
|
+
internalBinaryWrite(message: ExamQuestion, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
461
|
+
/* uint64 id = 1 [jstype = JS_STRING]; */
|
|
462
|
+
if (message.id !== "0")
|
|
463
|
+
writer.tag(1, WireType.Varint).uint64(message.id);
|
|
464
|
+
/* uint64 qualification_id = 2 [jstype = JS_STRING]; */
|
|
465
|
+
if (message.qualificationId !== "0")
|
|
466
|
+
writer.tag(2, WireType.Varint).uint64(message.qualificationId);
|
|
467
|
+
/* optional resources.timestamp.Timestamp created_at = 3; */
|
|
468
|
+
if (message.createdAt)
|
|
469
|
+
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
470
|
+
/* optional resources.timestamp.Timestamp updated_at = 4; */
|
|
471
|
+
if (message.updatedAt)
|
|
472
|
+
Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
473
|
+
/* string title = 5; */
|
|
474
|
+
if (message.title !== "")
|
|
475
|
+
writer.tag(5, WireType.LengthDelimited).string(message.title);
|
|
476
|
+
/* optional string description = 6; */
|
|
477
|
+
if (message.description !== undefined)
|
|
478
|
+
writer.tag(6, WireType.LengthDelimited).string(message.description);
|
|
479
|
+
/* resources.qualifications.ExamQuestionData data = 7; */
|
|
480
|
+
if (message.data)
|
|
481
|
+
ExamQuestionData.internalBinaryWrite(message.data, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
482
|
+
/* optional resources.qualifications.ExamQuestionAnswerData answer = 8; */
|
|
483
|
+
if (message.answer)
|
|
484
|
+
ExamQuestionAnswerData.internalBinaryWrite(message.answer, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
|
|
485
|
+
/* optional int32 points = 9; */
|
|
486
|
+
if (message.points !== undefined)
|
|
487
|
+
writer.tag(9, WireType.Varint).int32(message.points);
|
|
488
|
+
let u = options.writeUnknownFields;
|
|
489
|
+
if (u !== false)
|
|
490
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
491
|
+
return writer;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* @generated MessageType for protobuf message resources.qualifications.ExamQuestion
|
|
496
|
+
*/
|
|
497
|
+
export const ExamQuestion = new ExamQuestion$Type();
|
|
498
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
499
|
+
class ExamQuestionData$Type extends MessageType<ExamQuestionData> {
|
|
500
|
+
constructor() {
|
|
501
|
+
super("resources.qualifications.ExamQuestionData", [
|
|
502
|
+
{ no: 1, name: "separator", kind: "message", oneof: "data", T: () => ExamQuestionSeparator },
|
|
503
|
+
{ no: 6, name: "image", kind: "message", oneof: "data", T: () => ExamQuestionImage },
|
|
504
|
+
{ no: 2, name: "yesno", kind: "message", oneof: "data", T: () => ExamQuestionYesNo },
|
|
505
|
+
{ no: 3, name: "free_text", kind: "message", oneof: "data", T: () => ExamQuestionText },
|
|
506
|
+
{ no: 4, name: "single_choice", kind: "message", oneof: "data", T: () => ExamQuestionSingleChoice },
|
|
507
|
+
{ no: 5, name: "multiple_choice", kind: "message", oneof: "data", T: () => ExamQuestionMultipleChoice }
|
|
508
|
+
]);
|
|
509
|
+
}
|
|
510
|
+
create(value?: PartialMessage<ExamQuestionData>): ExamQuestionData {
|
|
511
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
512
|
+
message.data = { oneofKind: undefined };
|
|
513
|
+
if (value !== undefined)
|
|
514
|
+
reflectionMergePartial<ExamQuestionData>(this, message, value);
|
|
515
|
+
return message;
|
|
516
|
+
}
|
|
517
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExamQuestionData): ExamQuestionData {
|
|
518
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
519
|
+
while (reader.pos < end) {
|
|
520
|
+
let [fieldNo, wireType] = reader.tag();
|
|
521
|
+
switch (fieldNo) {
|
|
522
|
+
case /* resources.qualifications.ExamQuestionSeparator separator */ 1:
|
|
523
|
+
message.data = {
|
|
524
|
+
oneofKind: "separator",
|
|
525
|
+
separator: ExamQuestionSeparator.internalBinaryRead(reader, reader.uint32(), options, (message.data as any).separator)
|
|
526
|
+
};
|
|
527
|
+
break;
|
|
528
|
+
case /* resources.qualifications.ExamQuestionImage image */ 6:
|
|
529
|
+
message.data = {
|
|
530
|
+
oneofKind: "image",
|
|
531
|
+
image: ExamQuestionImage.internalBinaryRead(reader, reader.uint32(), options, (message.data as any).image)
|
|
532
|
+
};
|
|
533
|
+
break;
|
|
534
|
+
case /* resources.qualifications.ExamQuestionYesNo yesno */ 2:
|
|
535
|
+
message.data = {
|
|
536
|
+
oneofKind: "yesno",
|
|
537
|
+
yesno: ExamQuestionYesNo.internalBinaryRead(reader, reader.uint32(), options, (message.data as any).yesno)
|
|
538
|
+
};
|
|
539
|
+
break;
|
|
540
|
+
case /* resources.qualifications.ExamQuestionText free_text */ 3:
|
|
541
|
+
message.data = {
|
|
542
|
+
oneofKind: "freeText",
|
|
543
|
+
freeText: ExamQuestionText.internalBinaryRead(reader, reader.uint32(), options, (message.data as any).freeText)
|
|
544
|
+
};
|
|
545
|
+
break;
|
|
546
|
+
case /* resources.qualifications.ExamQuestionSingleChoice single_choice */ 4:
|
|
547
|
+
message.data = {
|
|
548
|
+
oneofKind: "singleChoice",
|
|
549
|
+
singleChoice: ExamQuestionSingleChoice.internalBinaryRead(reader, reader.uint32(), options, (message.data as any).singleChoice)
|
|
550
|
+
};
|
|
551
|
+
break;
|
|
552
|
+
case /* resources.qualifications.ExamQuestionMultipleChoice multiple_choice */ 5:
|
|
553
|
+
message.data = {
|
|
554
|
+
oneofKind: "multipleChoice",
|
|
555
|
+
multipleChoice: ExamQuestionMultipleChoice.internalBinaryRead(reader, reader.uint32(), options, (message.data as any).multipleChoice)
|
|
556
|
+
};
|
|
557
|
+
break;
|
|
558
|
+
default:
|
|
559
|
+
let u = options.readUnknownField;
|
|
560
|
+
if (u === "throw")
|
|
561
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
562
|
+
let d = reader.skip(wireType);
|
|
563
|
+
if (u !== false)
|
|
564
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
return message;
|
|
568
|
+
}
|
|
569
|
+
internalBinaryWrite(message: ExamQuestionData, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
570
|
+
/* resources.qualifications.ExamQuestionSeparator separator = 1; */
|
|
571
|
+
if (message.data.oneofKind === "separator")
|
|
572
|
+
ExamQuestionSeparator.internalBinaryWrite(message.data.separator, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
573
|
+
/* resources.qualifications.ExamQuestionImage image = 6; */
|
|
574
|
+
if (message.data.oneofKind === "image")
|
|
575
|
+
ExamQuestionImage.internalBinaryWrite(message.data.image, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
576
|
+
/* resources.qualifications.ExamQuestionYesNo yesno = 2; */
|
|
577
|
+
if (message.data.oneofKind === "yesno")
|
|
578
|
+
ExamQuestionYesNo.internalBinaryWrite(message.data.yesno, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
579
|
+
/* resources.qualifications.ExamQuestionText free_text = 3; */
|
|
580
|
+
if (message.data.oneofKind === "freeText")
|
|
581
|
+
ExamQuestionText.internalBinaryWrite(message.data.freeText, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
582
|
+
/* resources.qualifications.ExamQuestionSingleChoice single_choice = 4; */
|
|
583
|
+
if (message.data.oneofKind === "singleChoice")
|
|
584
|
+
ExamQuestionSingleChoice.internalBinaryWrite(message.data.singleChoice, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
585
|
+
/* resources.qualifications.ExamQuestionMultipleChoice multiple_choice = 5; */
|
|
586
|
+
if (message.data.oneofKind === "multipleChoice")
|
|
587
|
+
ExamQuestionMultipleChoice.internalBinaryWrite(message.data.multipleChoice, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
588
|
+
let u = options.writeUnknownFields;
|
|
589
|
+
if (u !== false)
|
|
590
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
591
|
+
return writer;
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
/**
|
|
595
|
+
* @generated MessageType for protobuf message resources.qualifications.ExamQuestionData
|
|
596
|
+
*/
|
|
597
|
+
export const ExamQuestionData = new ExamQuestionData$Type();
|
|
598
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
599
|
+
class ExamQuestionSeparator$Type extends MessageType<ExamQuestionSeparator> {
|
|
600
|
+
constructor() {
|
|
601
|
+
super("resources.qualifications.ExamQuestionSeparator", []);
|
|
602
|
+
}
|
|
603
|
+
create(value?: PartialMessage<ExamQuestionSeparator>): ExamQuestionSeparator {
|
|
604
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
605
|
+
if (value !== undefined)
|
|
606
|
+
reflectionMergePartial<ExamQuestionSeparator>(this, message, value);
|
|
607
|
+
return message;
|
|
608
|
+
}
|
|
609
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExamQuestionSeparator): ExamQuestionSeparator {
|
|
610
|
+
return target ?? this.create();
|
|
611
|
+
}
|
|
612
|
+
internalBinaryWrite(message: ExamQuestionSeparator, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
613
|
+
let u = options.writeUnknownFields;
|
|
614
|
+
if (u !== false)
|
|
615
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
616
|
+
return writer;
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
/**
|
|
620
|
+
* @generated MessageType for protobuf message resources.qualifications.ExamQuestionSeparator
|
|
621
|
+
*/
|
|
622
|
+
export const ExamQuestionSeparator = new ExamQuestionSeparator$Type();
|
|
623
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
624
|
+
class ExamQuestionImage$Type extends MessageType<ExamQuestionImage> {
|
|
625
|
+
constructor() {
|
|
626
|
+
super("resources.qualifications.ExamQuestionImage", [
|
|
627
|
+
{ no: 1, name: "image", kind: "message", T: () => File },
|
|
628
|
+
{ no: 2, name: "alt", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "128" } } } }
|
|
629
|
+
]);
|
|
630
|
+
}
|
|
631
|
+
create(value?: PartialMessage<ExamQuestionImage>): ExamQuestionImage {
|
|
632
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
633
|
+
if (value !== undefined)
|
|
634
|
+
reflectionMergePartial<ExamQuestionImage>(this, message, value);
|
|
635
|
+
return message;
|
|
636
|
+
}
|
|
637
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExamQuestionImage): ExamQuestionImage {
|
|
638
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
639
|
+
while (reader.pos < end) {
|
|
640
|
+
let [fieldNo, wireType] = reader.tag();
|
|
641
|
+
switch (fieldNo) {
|
|
642
|
+
case /* resources.filestore.File image */ 1:
|
|
643
|
+
message.image = File.internalBinaryRead(reader, reader.uint32(), options, message.image);
|
|
644
|
+
break;
|
|
645
|
+
case /* optional string alt */ 2:
|
|
646
|
+
message.alt = reader.string();
|
|
647
|
+
break;
|
|
648
|
+
default:
|
|
649
|
+
let u = options.readUnknownField;
|
|
650
|
+
if (u === "throw")
|
|
651
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
652
|
+
let d = reader.skip(wireType);
|
|
653
|
+
if (u !== false)
|
|
654
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
return message;
|
|
658
|
+
}
|
|
659
|
+
internalBinaryWrite(message: ExamQuestionImage, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
660
|
+
/* resources.filestore.File image = 1; */
|
|
661
|
+
if (message.image)
|
|
662
|
+
File.internalBinaryWrite(message.image, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
663
|
+
/* optional string alt = 2; */
|
|
664
|
+
if (message.alt !== undefined)
|
|
665
|
+
writer.tag(2, WireType.LengthDelimited).string(message.alt);
|
|
666
|
+
let u = options.writeUnknownFields;
|
|
667
|
+
if (u !== false)
|
|
668
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
669
|
+
return writer;
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
/**
|
|
673
|
+
* @generated MessageType for protobuf message resources.qualifications.ExamQuestionImage
|
|
674
|
+
*/
|
|
675
|
+
export const ExamQuestionImage = new ExamQuestionImage$Type();
|
|
676
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
677
|
+
class ExamQuestionYesNo$Type extends MessageType<ExamQuestionYesNo> {
|
|
678
|
+
constructor() {
|
|
679
|
+
super("resources.qualifications.ExamQuestionYesNo", []);
|
|
680
|
+
}
|
|
681
|
+
create(value?: PartialMessage<ExamQuestionYesNo>): ExamQuestionYesNo {
|
|
682
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
683
|
+
if (value !== undefined)
|
|
684
|
+
reflectionMergePartial<ExamQuestionYesNo>(this, message, value);
|
|
685
|
+
return message;
|
|
686
|
+
}
|
|
687
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExamQuestionYesNo): ExamQuestionYesNo {
|
|
688
|
+
return target ?? this.create();
|
|
689
|
+
}
|
|
690
|
+
internalBinaryWrite(message: ExamQuestionYesNo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
691
|
+
let u = options.writeUnknownFields;
|
|
692
|
+
if (u !== false)
|
|
693
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
694
|
+
return writer;
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
/**
|
|
698
|
+
* @generated MessageType for protobuf message resources.qualifications.ExamQuestionYesNo
|
|
699
|
+
*/
|
|
700
|
+
export const ExamQuestionYesNo = new ExamQuestionYesNo$Type();
|
|
701
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
702
|
+
class ExamQuestionText$Type extends MessageType<ExamQuestionText> {
|
|
703
|
+
constructor() {
|
|
704
|
+
super("resources.qualifications.ExamQuestionText", [
|
|
705
|
+
{ no: 1, name: "min_length", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
706
|
+
{ no: 2, name: "max_length", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
|
|
707
|
+
]);
|
|
708
|
+
}
|
|
709
|
+
create(value?: PartialMessage<ExamQuestionText>): ExamQuestionText {
|
|
710
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
711
|
+
message.minLength = 0;
|
|
712
|
+
message.maxLength = 0;
|
|
713
|
+
if (value !== undefined)
|
|
714
|
+
reflectionMergePartial<ExamQuestionText>(this, message, value);
|
|
715
|
+
return message;
|
|
716
|
+
}
|
|
717
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExamQuestionText): ExamQuestionText {
|
|
718
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
719
|
+
while (reader.pos < end) {
|
|
720
|
+
let [fieldNo, wireType] = reader.tag();
|
|
721
|
+
switch (fieldNo) {
|
|
722
|
+
case /* int32 min_length */ 1:
|
|
723
|
+
message.minLength = reader.int32();
|
|
724
|
+
break;
|
|
725
|
+
case /* int32 max_length */ 2:
|
|
726
|
+
message.maxLength = reader.int32();
|
|
727
|
+
break;
|
|
728
|
+
default:
|
|
729
|
+
let u = options.readUnknownField;
|
|
730
|
+
if (u === "throw")
|
|
731
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
732
|
+
let d = reader.skip(wireType);
|
|
733
|
+
if (u !== false)
|
|
734
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
return message;
|
|
738
|
+
}
|
|
739
|
+
internalBinaryWrite(message: ExamQuestionText, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
740
|
+
/* int32 min_length = 1; */
|
|
741
|
+
if (message.minLength !== 0)
|
|
742
|
+
writer.tag(1, WireType.Varint).int32(message.minLength);
|
|
743
|
+
/* int32 max_length = 2; */
|
|
744
|
+
if (message.maxLength !== 0)
|
|
745
|
+
writer.tag(2, WireType.Varint).int32(message.maxLength);
|
|
746
|
+
let u = options.writeUnknownFields;
|
|
747
|
+
if (u !== false)
|
|
748
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
749
|
+
return writer;
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* @generated MessageType for protobuf message resources.qualifications.ExamQuestionText
|
|
754
|
+
*/
|
|
755
|
+
export const ExamQuestionText = new ExamQuestionText$Type();
|
|
756
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
757
|
+
class ExamQuestionSingleChoice$Type extends MessageType<ExamQuestionSingleChoice> {
|
|
758
|
+
constructor() {
|
|
759
|
+
super("resources.qualifications.ExamQuestionSingleChoice", [
|
|
760
|
+
{ no: 1, name: "choices", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { repeated: { maxItems: "10" } } } }
|
|
761
|
+
]);
|
|
762
|
+
}
|
|
763
|
+
create(value?: PartialMessage<ExamQuestionSingleChoice>): ExamQuestionSingleChoice {
|
|
764
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
765
|
+
message.choices = [];
|
|
766
|
+
if (value !== undefined)
|
|
767
|
+
reflectionMergePartial<ExamQuestionSingleChoice>(this, message, value);
|
|
768
|
+
return message;
|
|
769
|
+
}
|
|
770
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExamQuestionSingleChoice): ExamQuestionSingleChoice {
|
|
771
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
772
|
+
while (reader.pos < end) {
|
|
773
|
+
let [fieldNo, wireType] = reader.tag();
|
|
774
|
+
switch (fieldNo) {
|
|
775
|
+
case /* repeated string choices */ 1:
|
|
776
|
+
message.choices.push(reader.string());
|
|
777
|
+
break;
|
|
778
|
+
default:
|
|
779
|
+
let u = options.readUnknownField;
|
|
780
|
+
if (u === "throw")
|
|
781
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
782
|
+
let d = reader.skip(wireType);
|
|
783
|
+
if (u !== false)
|
|
784
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
return message;
|
|
788
|
+
}
|
|
789
|
+
internalBinaryWrite(message: ExamQuestionSingleChoice, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
790
|
+
/* repeated string choices = 1; */
|
|
791
|
+
for (let i = 0; i < message.choices.length; i++)
|
|
792
|
+
writer.tag(1, WireType.LengthDelimited).string(message.choices[i]);
|
|
793
|
+
let u = options.writeUnknownFields;
|
|
794
|
+
if (u !== false)
|
|
795
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
796
|
+
return writer;
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
/**
|
|
800
|
+
* @generated MessageType for protobuf message resources.qualifications.ExamQuestionSingleChoice
|
|
801
|
+
*/
|
|
802
|
+
export const ExamQuestionSingleChoice = new ExamQuestionSingleChoice$Type();
|
|
803
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
804
|
+
class ExamQuestionMultipleChoice$Type extends MessageType<ExamQuestionMultipleChoice> {
|
|
805
|
+
constructor() {
|
|
806
|
+
super("resources.qualifications.ExamQuestionMultipleChoice", [
|
|
807
|
+
{ no: 1, name: "choices", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { repeated: { maxItems: "10" } } } },
|
|
808
|
+
{ no: 2, name: "limit", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { lte: 10, gte: 0 } } } }
|
|
809
|
+
]);
|
|
810
|
+
}
|
|
811
|
+
create(value?: PartialMessage<ExamQuestionMultipleChoice>): ExamQuestionMultipleChoice {
|
|
812
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
813
|
+
message.choices = [];
|
|
814
|
+
if (value !== undefined)
|
|
815
|
+
reflectionMergePartial<ExamQuestionMultipleChoice>(this, message, value);
|
|
816
|
+
return message;
|
|
817
|
+
}
|
|
818
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExamQuestionMultipleChoice): ExamQuestionMultipleChoice {
|
|
819
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
820
|
+
while (reader.pos < end) {
|
|
821
|
+
let [fieldNo, wireType] = reader.tag();
|
|
822
|
+
switch (fieldNo) {
|
|
823
|
+
case /* repeated string choices */ 1:
|
|
824
|
+
message.choices.push(reader.string());
|
|
825
|
+
break;
|
|
826
|
+
case /* optional int32 limit */ 2:
|
|
827
|
+
message.limit = reader.int32();
|
|
828
|
+
break;
|
|
829
|
+
default:
|
|
830
|
+
let u = options.readUnknownField;
|
|
831
|
+
if (u === "throw")
|
|
832
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
833
|
+
let d = reader.skip(wireType);
|
|
834
|
+
if (u !== false)
|
|
835
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
return message;
|
|
839
|
+
}
|
|
840
|
+
internalBinaryWrite(message: ExamQuestionMultipleChoice, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
841
|
+
/* repeated string choices = 1; */
|
|
842
|
+
for (let i = 0; i < message.choices.length; i++)
|
|
843
|
+
writer.tag(1, WireType.LengthDelimited).string(message.choices[i]);
|
|
844
|
+
/* optional int32 limit = 2; */
|
|
845
|
+
if (message.limit !== undefined)
|
|
846
|
+
writer.tag(2, WireType.Varint).int32(message.limit);
|
|
847
|
+
let u = options.writeUnknownFields;
|
|
848
|
+
if (u !== false)
|
|
849
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
850
|
+
return writer;
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
/**
|
|
854
|
+
* @generated MessageType for protobuf message resources.qualifications.ExamQuestionMultipleChoice
|
|
855
|
+
*/
|
|
856
|
+
export const ExamQuestionMultipleChoice = new ExamQuestionMultipleChoice$Type();
|
|
857
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
858
|
+
class ExamQuestionAnswerData$Type extends MessageType<ExamQuestionAnswerData> {
|
|
859
|
+
constructor() {
|
|
860
|
+
super("resources.qualifications.ExamQuestionAnswerData", [
|
|
861
|
+
{ no: 1, name: "answer_key", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "1024" } } } }
|
|
862
|
+
]);
|
|
863
|
+
}
|
|
864
|
+
create(value?: PartialMessage<ExamQuestionAnswerData>): ExamQuestionAnswerData {
|
|
865
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
866
|
+
message.answerKey = "";
|
|
867
|
+
if (value !== undefined)
|
|
868
|
+
reflectionMergePartial<ExamQuestionAnswerData>(this, message, value);
|
|
869
|
+
return message;
|
|
870
|
+
}
|
|
871
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExamQuestionAnswerData): ExamQuestionAnswerData {
|
|
872
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
873
|
+
while (reader.pos < end) {
|
|
874
|
+
let [fieldNo, wireType] = reader.tag();
|
|
875
|
+
switch (fieldNo) {
|
|
876
|
+
case /* string answer_key */ 1:
|
|
877
|
+
message.answerKey = reader.string();
|
|
878
|
+
break;
|
|
879
|
+
default:
|
|
880
|
+
let u = options.readUnknownField;
|
|
881
|
+
if (u === "throw")
|
|
882
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
883
|
+
let d = reader.skip(wireType);
|
|
884
|
+
if (u !== false)
|
|
885
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
return message;
|
|
889
|
+
}
|
|
890
|
+
internalBinaryWrite(message: ExamQuestionAnswerData, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
891
|
+
/* string answer_key = 1; */
|
|
892
|
+
if (message.answerKey !== "")
|
|
893
|
+
writer.tag(1, WireType.LengthDelimited).string(message.answerKey);
|
|
894
|
+
let u = options.writeUnknownFields;
|
|
895
|
+
if (u !== false)
|
|
896
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
897
|
+
return writer;
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
/**
|
|
901
|
+
* @generated MessageType for protobuf message resources.qualifications.ExamQuestionAnswerData
|
|
902
|
+
*/
|
|
903
|
+
export const ExamQuestionAnswerData = new ExamQuestionAnswerData$Type();
|
|
904
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
905
|
+
class ExamUser$Type extends MessageType<ExamUser> {
|
|
906
|
+
constructor() {
|
|
907
|
+
super("resources.qualifications.ExamUser", [
|
|
908
|
+
{ no: 1, name: "qualification_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
909
|
+
{ no: 2, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
910
|
+
{ no: 3, name: "created_at", kind: "message", T: () => Timestamp },
|
|
911
|
+
{ no: 4, name: "started_at", kind: "message", T: () => Timestamp },
|
|
912
|
+
{ no: 5, name: "ends_at", kind: "message", T: () => Timestamp },
|
|
913
|
+
{ no: 6, name: "ended_at", kind: "message", T: () => Timestamp }
|
|
914
|
+
]);
|
|
915
|
+
}
|
|
916
|
+
create(value?: PartialMessage<ExamUser>): ExamUser {
|
|
917
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
918
|
+
message.qualificationId = "0";
|
|
919
|
+
message.userId = 0;
|
|
920
|
+
if (value !== undefined)
|
|
921
|
+
reflectionMergePartial<ExamUser>(this, message, value);
|
|
922
|
+
return message;
|
|
923
|
+
}
|
|
924
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExamUser): ExamUser {
|
|
925
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
926
|
+
while (reader.pos < end) {
|
|
927
|
+
let [fieldNo, wireType] = reader.tag();
|
|
928
|
+
switch (fieldNo) {
|
|
929
|
+
case /* uint64 qualification_id = 1 [jstype = JS_STRING];*/ 1:
|
|
930
|
+
message.qualificationId = reader.uint64().toString();
|
|
931
|
+
break;
|
|
932
|
+
case /* int32 user_id */ 2:
|
|
933
|
+
message.userId = reader.int32();
|
|
934
|
+
break;
|
|
935
|
+
case /* optional resources.timestamp.Timestamp created_at */ 3:
|
|
936
|
+
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
937
|
+
break;
|
|
938
|
+
case /* optional resources.timestamp.Timestamp started_at */ 4:
|
|
939
|
+
message.startedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.startedAt);
|
|
940
|
+
break;
|
|
941
|
+
case /* optional resources.timestamp.Timestamp ends_at */ 5:
|
|
942
|
+
message.endsAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.endsAt);
|
|
943
|
+
break;
|
|
944
|
+
case /* optional resources.timestamp.Timestamp ended_at */ 6:
|
|
945
|
+
message.endedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.endedAt);
|
|
946
|
+
break;
|
|
947
|
+
default:
|
|
948
|
+
let u = options.readUnknownField;
|
|
949
|
+
if (u === "throw")
|
|
950
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
951
|
+
let d = reader.skip(wireType);
|
|
952
|
+
if (u !== false)
|
|
953
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
return message;
|
|
957
|
+
}
|
|
958
|
+
internalBinaryWrite(message: ExamUser, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
959
|
+
/* uint64 qualification_id = 1 [jstype = JS_STRING]; */
|
|
960
|
+
if (message.qualificationId !== "0")
|
|
961
|
+
writer.tag(1, WireType.Varint).uint64(message.qualificationId);
|
|
962
|
+
/* int32 user_id = 2; */
|
|
963
|
+
if (message.userId !== 0)
|
|
964
|
+
writer.tag(2, WireType.Varint).int32(message.userId);
|
|
965
|
+
/* optional resources.timestamp.Timestamp created_at = 3; */
|
|
966
|
+
if (message.createdAt)
|
|
967
|
+
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
968
|
+
/* optional resources.timestamp.Timestamp started_at = 4; */
|
|
969
|
+
if (message.startedAt)
|
|
970
|
+
Timestamp.internalBinaryWrite(message.startedAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
971
|
+
/* optional resources.timestamp.Timestamp ends_at = 5; */
|
|
972
|
+
if (message.endsAt)
|
|
973
|
+
Timestamp.internalBinaryWrite(message.endsAt, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
974
|
+
/* optional resources.timestamp.Timestamp ended_at = 6; */
|
|
975
|
+
if (message.endedAt)
|
|
976
|
+
Timestamp.internalBinaryWrite(message.endedAt, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
977
|
+
let u = options.writeUnknownFields;
|
|
978
|
+
if (u !== false)
|
|
979
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
980
|
+
return writer;
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
/**
|
|
984
|
+
* @generated MessageType for protobuf message resources.qualifications.ExamUser
|
|
985
|
+
*/
|
|
986
|
+
export const ExamUser = new ExamUser$Type();
|
|
987
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
988
|
+
class ExamResponses$Type extends MessageType<ExamResponses> {
|
|
989
|
+
constructor() {
|
|
990
|
+
super("resources.qualifications.ExamResponses", [
|
|
991
|
+
{ no: 1, name: "qualification_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
992
|
+
{ no: 2, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
993
|
+
{ no: 3, name: "responses", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => ExamResponse, options: { "validate.rules": { repeated: { maxItems: "50" } } } }
|
|
994
|
+
]);
|
|
995
|
+
}
|
|
996
|
+
create(value?: PartialMessage<ExamResponses>): ExamResponses {
|
|
997
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
998
|
+
message.qualificationId = "0";
|
|
999
|
+
message.userId = 0;
|
|
1000
|
+
message.responses = [];
|
|
1001
|
+
if (value !== undefined)
|
|
1002
|
+
reflectionMergePartial<ExamResponses>(this, message, value);
|
|
1003
|
+
return message;
|
|
1004
|
+
}
|
|
1005
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExamResponses): ExamResponses {
|
|
1006
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1007
|
+
while (reader.pos < end) {
|
|
1008
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1009
|
+
switch (fieldNo) {
|
|
1010
|
+
case /* uint64 qualification_id = 1 [jstype = JS_STRING];*/ 1:
|
|
1011
|
+
message.qualificationId = reader.uint64().toString();
|
|
1012
|
+
break;
|
|
1013
|
+
case /* int32 user_id */ 2:
|
|
1014
|
+
message.userId = reader.int32();
|
|
1015
|
+
break;
|
|
1016
|
+
case /* repeated resources.qualifications.ExamResponse responses */ 3:
|
|
1017
|
+
message.responses.push(ExamResponse.internalBinaryRead(reader, reader.uint32(), options));
|
|
1018
|
+
break;
|
|
1019
|
+
default:
|
|
1020
|
+
let u = options.readUnknownField;
|
|
1021
|
+
if (u === "throw")
|
|
1022
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1023
|
+
let d = reader.skip(wireType);
|
|
1024
|
+
if (u !== false)
|
|
1025
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
return message;
|
|
1029
|
+
}
|
|
1030
|
+
internalBinaryWrite(message: ExamResponses, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1031
|
+
/* uint64 qualification_id = 1 [jstype = JS_STRING]; */
|
|
1032
|
+
if (message.qualificationId !== "0")
|
|
1033
|
+
writer.tag(1, WireType.Varint).uint64(message.qualificationId);
|
|
1034
|
+
/* int32 user_id = 2; */
|
|
1035
|
+
if (message.userId !== 0)
|
|
1036
|
+
writer.tag(2, WireType.Varint).int32(message.userId);
|
|
1037
|
+
/* repeated resources.qualifications.ExamResponse responses = 3; */
|
|
1038
|
+
for (let i = 0; i < message.responses.length; i++)
|
|
1039
|
+
ExamResponse.internalBinaryWrite(message.responses[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
1040
|
+
let u = options.writeUnknownFields;
|
|
1041
|
+
if (u !== false)
|
|
1042
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1043
|
+
return writer;
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
/**
|
|
1047
|
+
* @generated MessageType for protobuf message resources.qualifications.ExamResponses
|
|
1048
|
+
*/
|
|
1049
|
+
export const ExamResponses = new ExamResponses$Type();
|
|
1050
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1051
|
+
class ExamResponse$Type extends MessageType<ExamResponse> {
|
|
1052
|
+
constructor() {
|
|
1053
|
+
super("resources.qualifications.ExamResponse", [
|
|
1054
|
+
{ no: 1, name: "question_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
1055
|
+
{ no: 2, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
1056
|
+
{ no: 3, name: "question", kind: "message", T: () => ExamQuestion },
|
|
1057
|
+
{ no: 4, name: "response", kind: "message", T: () => ExamResponseData }
|
|
1058
|
+
]);
|
|
1059
|
+
}
|
|
1060
|
+
create(value?: PartialMessage<ExamResponse>): ExamResponse {
|
|
1061
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1062
|
+
message.questionId = "0";
|
|
1063
|
+
message.userId = 0;
|
|
1064
|
+
if (value !== undefined)
|
|
1065
|
+
reflectionMergePartial<ExamResponse>(this, message, value);
|
|
1066
|
+
return message;
|
|
1067
|
+
}
|
|
1068
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExamResponse): ExamResponse {
|
|
1069
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1070
|
+
while (reader.pos < end) {
|
|
1071
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1072
|
+
switch (fieldNo) {
|
|
1073
|
+
case /* uint64 question_id = 1 [jstype = JS_STRING];*/ 1:
|
|
1074
|
+
message.questionId = reader.uint64().toString();
|
|
1075
|
+
break;
|
|
1076
|
+
case /* int32 user_id */ 2:
|
|
1077
|
+
message.userId = reader.int32();
|
|
1078
|
+
break;
|
|
1079
|
+
case /* resources.qualifications.ExamQuestion question */ 3:
|
|
1080
|
+
message.question = ExamQuestion.internalBinaryRead(reader, reader.uint32(), options, message.question);
|
|
1081
|
+
break;
|
|
1082
|
+
case /* resources.qualifications.ExamResponseData response */ 4:
|
|
1083
|
+
message.response = ExamResponseData.internalBinaryRead(reader, reader.uint32(), options, message.response);
|
|
1084
|
+
break;
|
|
1085
|
+
default:
|
|
1086
|
+
let u = options.readUnknownField;
|
|
1087
|
+
if (u === "throw")
|
|
1088
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1089
|
+
let d = reader.skip(wireType);
|
|
1090
|
+
if (u !== false)
|
|
1091
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
return message;
|
|
1095
|
+
}
|
|
1096
|
+
internalBinaryWrite(message: ExamResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1097
|
+
/* uint64 question_id = 1 [jstype = JS_STRING]; */
|
|
1098
|
+
if (message.questionId !== "0")
|
|
1099
|
+
writer.tag(1, WireType.Varint).uint64(message.questionId);
|
|
1100
|
+
/* int32 user_id = 2; */
|
|
1101
|
+
if (message.userId !== 0)
|
|
1102
|
+
writer.tag(2, WireType.Varint).int32(message.userId);
|
|
1103
|
+
/* resources.qualifications.ExamQuestion question = 3; */
|
|
1104
|
+
if (message.question)
|
|
1105
|
+
ExamQuestion.internalBinaryWrite(message.question, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
1106
|
+
/* resources.qualifications.ExamResponseData response = 4; */
|
|
1107
|
+
if (message.response)
|
|
1108
|
+
ExamResponseData.internalBinaryWrite(message.response, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
1109
|
+
let u = options.writeUnknownFields;
|
|
1110
|
+
if (u !== false)
|
|
1111
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1112
|
+
return writer;
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
/**
|
|
1116
|
+
* @generated MessageType for protobuf message resources.qualifications.ExamResponse
|
|
1117
|
+
*/
|
|
1118
|
+
export const ExamResponse = new ExamResponse$Type();
|
|
1119
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1120
|
+
class ExamResponseData$Type extends MessageType<ExamResponseData> {
|
|
1121
|
+
constructor() {
|
|
1122
|
+
super("resources.qualifications.ExamResponseData", [
|
|
1123
|
+
{ no: 3, name: "separator", kind: "message", oneof: "response", T: () => ExamResponseSeparator },
|
|
1124
|
+
{ no: 4, name: "yesno", kind: "message", oneof: "response", T: () => ExamResponseYesNo },
|
|
1125
|
+
{ no: 5, name: "free_text", kind: "message", oneof: "response", T: () => ExamResponseText },
|
|
1126
|
+
{ no: 6, name: "single_choice", kind: "message", oneof: "response", T: () => ExamResponseSingleChoice },
|
|
1127
|
+
{ no: 7, name: "multiple_choice", kind: "message", oneof: "response", T: () => ExamResponseMultipleChoice }
|
|
1128
|
+
]);
|
|
1129
|
+
}
|
|
1130
|
+
create(value?: PartialMessage<ExamResponseData>): ExamResponseData {
|
|
1131
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1132
|
+
message.response = { oneofKind: undefined };
|
|
1133
|
+
if (value !== undefined)
|
|
1134
|
+
reflectionMergePartial<ExamResponseData>(this, message, value);
|
|
1135
|
+
return message;
|
|
1136
|
+
}
|
|
1137
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExamResponseData): ExamResponseData {
|
|
1138
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1139
|
+
while (reader.pos < end) {
|
|
1140
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1141
|
+
switch (fieldNo) {
|
|
1142
|
+
case /* resources.qualifications.ExamResponseSeparator separator */ 3:
|
|
1143
|
+
message.response = {
|
|
1144
|
+
oneofKind: "separator",
|
|
1145
|
+
separator: ExamResponseSeparator.internalBinaryRead(reader, reader.uint32(), options, (message.response as any).separator)
|
|
1146
|
+
};
|
|
1147
|
+
break;
|
|
1148
|
+
case /* resources.qualifications.ExamResponseYesNo yesno */ 4:
|
|
1149
|
+
message.response = {
|
|
1150
|
+
oneofKind: "yesno",
|
|
1151
|
+
yesno: ExamResponseYesNo.internalBinaryRead(reader, reader.uint32(), options, (message.response as any).yesno)
|
|
1152
|
+
};
|
|
1153
|
+
break;
|
|
1154
|
+
case /* resources.qualifications.ExamResponseText free_text */ 5:
|
|
1155
|
+
message.response = {
|
|
1156
|
+
oneofKind: "freeText",
|
|
1157
|
+
freeText: ExamResponseText.internalBinaryRead(reader, reader.uint32(), options, (message.response as any).freeText)
|
|
1158
|
+
};
|
|
1159
|
+
break;
|
|
1160
|
+
case /* resources.qualifications.ExamResponseSingleChoice single_choice */ 6:
|
|
1161
|
+
message.response = {
|
|
1162
|
+
oneofKind: "singleChoice",
|
|
1163
|
+
singleChoice: ExamResponseSingleChoice.internalBinaryRead(reader, reader.uint32(), options, (message.response as any).singleChoice)
|
|
1164
|
+
};
|
|
1165
|
+
break;
|
|
1166
|
+
case /* resources.qualifications.ExamResponseMultipleChoice multiple_choice */ 7:
|
|
1167
|
+
message.response = {
|
|
1168
|
+
oneofKind: "multipleChoice",
|
|
1169
|
+
multipleChoice: ExamResponseMultipleChoice.internalBinaryRead(reader, reader.uint32(), options, (message.response as any).multipleChoice)
|
|
1170
|
+
};
|
|
1171
|
+
break;
|
|
1172
|
+
default:
|
|
1173
|
+
let u = options.readUnknownField;
|
|
1174
|
+
if (u === "throw")
|
|
1175
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1176
|
+
let d = reader.skip(wireType);
|
|
1177
|
+
if (u !== false)
|
|
1178
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
return message;
|
|
1182
|
+
}
|
|
1183
|
+
internalBinaryWrite(message: ExamResponseData, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1184
|
+
/* resources.qualifications.ExamResponseSeparator separator = 3; */
|
|
1185
|
+
if (message.response.oneofKind === "separator")
|
|
1186
|
+
ExamResponseSeparator.internalBinaryWrite(message.response.separator, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
1187
|
+
/* resources.qualifications.ExamResponseYesNo yesno = 4; */
|
|
1188
|
+
if (message.response.oneofKind === "yesno")
|
|
1189
|
+
ExamResponseYesNo.internalBinaryWrite(message.response.yesno, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
1190
|
+
/* resources.qualifications.ExamResponseText free_text = 5; */
|
|
1191
|
+
if (message.response.oneofKind === "freeText")
|
|
1192
|
+
ExamResponseText.internalBinaryWrite(message.response.freeText, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
1193
|
+
/* resources.qualifications.ExamResponseSingleChoice single_choice = 6; */
|
|
1194
|
+
if (message.response.oneofKind === "singleChoice")
|
|
1195
|
+
ExamResponseSingleChoice.internalBinaryWrite(message.response.singleChoice, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
1196
|
+
/* resources.qualifications.ExamResponseMultipleChoice multiple_choice = 7; */
|
|
1197
|
+
if (message.response.oneofKind === "multipleChoice")
|
|
1198
|
+
ExamResponseMultipleChoice.internalBinaryWrite(message.response.multipleChoice, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
1199
|
+
let u = options.writeUnknownFields;
|
|
1200
|
+
if (u !== false)
|
|
1201
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1202
|
+
return writer;
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
/**
|
|
1206
|
+
* @generated MessageType for protobuf message resources.qualifications.ExamResponseData
|
|
1207
|
+
*/
|
|
1208
|
+
export const ExamResponseData = new ExamResponseData$Type();
|
|
1209
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1210
|
+
class ExamResponseSeparator$Type extends MessageType<ExamResponseSeparator> {
|
|
1211
|
+
constructor() {
|
|
1212
|
+
super("resources.qualifications.ExamResponseSeparator", []);
|
|
1213
|
+
}
|
|
1214
|
+
create(value?: PartialMessage<ExamResponseSeparator>): ExamResponseSeparator {
|
|
1215
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1216
|
+
if (value !== undefined)
|
|
1217
|
+
reflectionMergePartial<ExamResponseSeparator>(this, message, value);
|
|
1218
|
+
return message;
|
|
1219
|
+
}
|
|
1220
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExamResponseSeparator): ExamResponseSeparator {
|
|
1221
|
+
return target ?? this.create();
|
|
1222
|
+
}
|
|
1223
|
+
internalBinaryWrite(message: ExamResponseSeparator, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1224
|
+
let u = options.writeUnknownFields;
|
|
1225
|
+
if (u !== false)
|
|
1226
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1227
|
+
return writer;
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
/**
|
|
1231
|
+
* @generated MessageType for protobuf message resources.qualifications.ExamResponseSeparator
|
|
1232
|
+
*/
|
|
1233
|
+
export const ExamResponseSeparator = new ExamResponseSeparator$Type();
|
|
1234
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1235
|
+
class ExamResponseYesNo$Type extends MessageType<ExamResponseYesNo> {
|
|
1236
|
+
constructor() {
|
|
1237
|
+
super("resources.qualifications.ExamResponseYesNo", [
|
|
1238
|
+
{ no: 1, name: "value", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
1239
|
+
]);
|
|
1240
|
+
}
|
|
1241
|
+
create(value?: PartialMessage<ExamResponseYesNo>): ExamResponseYesNo {
|
|
1242
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1243
|
+
message.value = false;
|
|
1244
|
+
if (value !== undefined)
|
|
1245
|
+
reflectionMergePartial<ExamResponseYesNo>(this, message, value);
|
|
1246
|
+
return message;
|
|
1247
|
+
}
|
|
1248
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExamResponseYesNo): ExamResponseYesNo {
|
|
1249
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1250
|
+
while (reader.pos < end) {
|
|
1251
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1252
|
+
switch (fieldNo) {
|
|
1253
|
+
case /* bool value */ 1:
|
|
1254
|
+
message.value = reader.bool();
|
|
1255
|
+
break;
|
|
1256
|
+
default:
|
|
1257
|
+
let u = options.readUnknownField;
|
|
1258
|
+
if (u === "throw")
|
|
1259
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1260
|
+
let d = reader.skip(wireType);
|
|
1261
|
+
if (u !== false)
|
|
1262
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
return message;
|
|
1266
|
+
}
|
|
1267
|
+
internalBinaryWrite(message: ExamResponseYesNo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1268
|
+
/* bool value = 1; */
|
|
1269
|
+
if (message.value !== false)
|
|
1270
|
+
writer.tag(1, WireType.Varint).bool(message.value);
|
|
1271
|
+
let u = options.writeUnknownFields;
|
|
1272
|
+
if (u !== false)
|
|
1273
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1274
|
+
return writer;
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
/**
|
|
1278
|
+
* @generated MessageType for protobuf message resources.qualifications.ExamResponseYesNo
|
|
1279
|
+
*/
|
|
1280
|
+
export const ExamResponseYesNo = new ExamResponseYesNo$Type();
|
|
1281
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1282
|
+
class ExamResponseText$Type extends MessageType<ExamResponseText> {
|
|
1283
|
+
constructor() {
|
|
1284
|
+
super("resources.qualifications.ExamResponseText", [
|
|
1285
|
+
{ no: 1, name: "text", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxBytes: "500000" } } } }
|
|
1286
|
+
]);
|
|
1287
|
+
}
|
|
1288
|
+
create(value?: PartialMessage<ExamResponseText>): ExamResponseText {
|
|
1289
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1290
|
+
message.text = "";
|
|
1291
|
+
if (value !== undefined)
|
|
1292
|
+
reflectionMergePartial<ExamResponseText>(this, message, value);
|
|
1293
|
+
return message;
|
|
1294
|
+
}
|
|
1295
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExamResponseText): ExamResponseText {
|
|
1296
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1297
|
+
while (reader.pos < end) {
|
|
1298
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1299
|
+
switch (fieldNo) {
|
|
1300
|
+
case /* string text */ 1:
|
|
1301
|
+
message.text = reader.string();
|
|
1302
|
+
break;
|
|
1303
|
+
default:
|
|
1304
|
+
let u = options.readUnknownField;
|
|
1305
|
+
if (u === "throw")
|
|
1306
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1307
|
+
let d = reader.skip(wireType);
|
|
1308
|
+
if (u !== false)
|
|
1309
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
return message;
|
|
1313
|
+
}
|
|
1314
|
+
internalBinaryWrite(message: ExamResponseText, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1315
|
+
/* string text = 1; */
|
|
1316
|
+
if (message.text !== "")
|
|
1317
|
+
writer.tag(1, WireType.LengthDelimited).string(message.text);
|
|
1318
|
+
let u = options.writeUnknownFields;
|
|
1319
|
+
if (u !== false)
|
|
1320
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1321
|
+
return writer;
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
/**
|
|
1325
|
+
* @generated MessageType for protobuf message resources.qualifications.ExamResponseText
|
|
1326
|
+
*/
|
|
1327
|
+
export const ExamResponseText = new ExamResponseText$Type();
|
|
1328
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1329
|
+
class ExamResponseSingleChoice$Type extends MessageType<ExamResponseSingleChoice> {
|
|
1330
|
+
constructor() {
|
|
1331
|
+
super("resources.qualifications.ExamResponseSingleChoice", [
|
|
1332
|
+
{ no: 1, name: "choice", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "512" } } } }
|
|
1333
|
+
]);
|
|
1334
|
+
}
|
|
1335
|
+
create(value?: PartialMessage<ExamResponseSingleChoice>): ExamResponseSingleChoice {
|
|
1336
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1337
|
+
message.choice = "";
|
|
1338
|
+
if (value !== undefined)
|
|
1339
|
+
reflectionMergePartial<ExamResponseSingleChoice>(this, message, value);
|
|
1340
|
+
return message;
|
|
1341
|
+
}
|
|
1342
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExamResponseSingleChoice): ExamResponseSingleChoice {
|
|
1343
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1344
|
+
while (reader.pos < end) {
|
|
1345
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1346
|
+
switch (fieldNo) {
|
|
1347
|
+
case /* string choice */ 1:
|
|
1348
|
+
message.choice = reader.string();
|
|
1349
|
+
break;
|
|
1350
|
+
default:
|
|
1351
|
+
let u = options.readUnknownField;
|
|
1352
|
+
if (u === "throw")
|
|
1353
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1354
|
+
let d = reader.skip(wireType);
|
|
1355
|
+
if (u !== false)
|
|
1356
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
return message;
|
|
1360
|
+
}
|
|
1361
|
+
internalBinaryWrite(message: ExamResponseSingleChoice, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1362
|
+
/* string choice = 1; */
|
|
1363
|
+
if (message.choice !== "")
|
|
1364
|
+
writer.tag(1, WireType.LengthDelimited).string(message.choice);
|
|
1365
|
+
let u = options.writeUnknownFields;
|
|
1366
|
+
if (u !== false)
|
|
1367
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1368
|
+
return writer;
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
/**
|
|
1372
|
+
* @generated MessageType for protobuf message resources.qualifications.ExamResponseSingleChoice
|
|
1373
|
+
*/
|
|
1374
|
+
export const ExamResponseSingleChoice = new ExamResponseSingleChoice$Type();
|
|
1375
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1376
|
+
class ExamResponseMultipleChoice$Type extends MessageType<ExamResponseMultipleChoice> {
|
|
1377
|
+
constructor() {
|
|
1378
|
+
super("resources.qualifications.ExamResponseMultipleChoice", [
|
|
1379
|
+
{ no: 1, name: "choices", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { repeated: { maxItems: "10" } } } }
|
|
1380
|
+
]);
|
|
1381
|
+
}
|
|
1382
|
+
create(value?: PartialMessage<ExamResponseMultipleChoice>): ExamResponseMultipleChoice {
|
|
1383
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1384
|
+
message.choices = [];
|
|
1385
|
+
if (value !== undefined)
|
|
1386
|
+
reflectionMergePartial<ExamResponseMultipleChoice>(this, message, value);
|
|
1387
|
+
return message;
|
|
1388
|
+
}
|
|
1389
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExamResponseMultipleChoice): ExamResponseMultipleChoice {
|
|
1390
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1391
|
+
while (reader.pos < end) {
|
|
1392
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1393
|
+
switch (fieldNo) {
|
|
1394
|
+
case /* repeated string choices */ 1:
|
|
1395
|
+
message.choices.push(reader.string());
|
|
1396
|
+
break;
|
|
1397
|
+
default:
|
|
1398
|
+
let u = options.readUnknownField;
|
|
1399
|
+
if (u === "throw")
|
|
1400
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1401
|
+
let d = reader.skip(wireType);
|
|
1402
|
+
if (u !== false)
|
|
1403
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
return message;
|
|
1407
|
+
}
|
|
1408
|
+
internalBinaryWrite(message: ExamResponseMultipleChoice, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1409
|
+
/* repeated string choices = 1; */
|
|
1410
|
+
for (let i = 0; i < message.choices.length; i++)
|
|
1411
|
+
writer.tag(1, WireType.LengthDelimited).string(message.choices[i]);
|
|
1412
|
+
let u = options.writeUnknownFields;
|
|
1413
|
+
if (u !== false)
|
|
1414
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1415
|
+
return writer;
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1418
|
+
/**
|
|
1419
|
+
* @generated MessageType for protobuf message resources.qualifications.ExamResponseMultipleChoice
|
|
1420
|
+
*/
|
|
1421
|
+
export const ExamResponseMultipleChoice = new ExamResponseMultipleChoice$Type();
|