@aldiokta/protocgen 1.1.6 → 1.1.8

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.
@@ -21,10 +21,11 @@ var global =
21
21
  (function () { return this; }).call(null) ||
22
22
  Function('return this')();
23
23
 
24
+ goog.exportSymbol('proto.FileInfo', null, global);
25
+ goog.exportSymbol('proto.FileUploadReferencesReq', null, global);
24
26
  goog.exportSymbol('proto.FileUploadReq', null, global);
25
- goog.exportSymbol('proto.FileUploadRequest', null, global);
26
- goog.exportSymbol('proto.FileUploadResponse', null, global);
27
- goog.exportSymbol('proto.SaveFileRequest', null, global);
27
+ goog.exportSymbol('proto.FileUploadReq.DataCase', null, global);
28
+ goog.exportSymbol('proto.FileUploadRes', null, global);
28
29
  /**
29
30
  * Generated by JsPbCodeGenerator.
30
31
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -35,16 +36,16 @@ goog.exportSymbol('proto.SaveFileRequest', null, global);
35
36
  * @extends {jspb.Message}
36
37
  * @constructor
37
38
  */
38
- proto.FileUploadRequest = function(opt_data) {
39
+ proto.FileInfo = function(opt_data) {
39
40
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
40
41
  };
41
- goog.inherits(proto.FileUploadRequest, jspb.Message);
42
+ goog.inherits(proto.FileInfo, jspb.Message);
42
43
  if (goog.DEBUG && !COMPILED) {
43
44
  /**
44
45
  * @public
45
46
  * @override
46
47
  */
47
- proto.FileUploadRequest.displayName = 'proto.FileUploadRequest';
48
+ proto.FileInfo.displayName = 'proto.FileInfo';
48
49
  }
49
50
  /**
50
51
  * Generated by JsPbCodeGenerator.
@@ -56,16 +57,16 @@ if (goog.DEBUG && !COMPILED) {
56
57
  * @extends {jspb.Message}
57
58
  * @constructor
58
59
  */
59
- proto.FileUploadResponse = function(opt_data) {
60
- jspb.Message.initialize(this, opt_data, 0, -1, proto.FileUploadResponse.repeatedFields_, null);
60
+ proto.FileUploadReq = function(opt_data) {
61
+ jspb.Message.initialize(this, opt_data, 0, -1, null, proto.FileUploadReq.oneofGroups_);
61
62
  };
62
- goog.inherits(proto.FileUploadResponse, jspb.Message);
63
+ goog.inherits(proto.FileUploadReq, jspb.Message);
63
64
  if (goog.DEBUG && !COMPILED) {
64
65
  /**
65
66
  * @public
66
67
  * @override
67
68
  */
68
- proto.FileUploadResponse.displayName = 'proto.FileUploadResponse';
69
+ proto.FileUploadReq.displayName = 'proto.FileUploadReq';
69
70
  }
70
71
  /**
71
72
  * Generated by JsPbCodeGenerator.
@@ -77,16 +78,16 @@ if (goog.DEBUG && !COMPILED) {
77
78
  * @extends {jspb.Message}
78
79
  * @constructor
79
80
  */
80
- proto.FileUploadReq = function(opt_data) {
81
+ proto.FileUploadReferencesReq = function(opt_data) {
81
82
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
82
83
  };
83
- goog.inherits(proto.FileUploadReq, jspb.Message);
84
+ goog.inherits(proto.FileUploadReferencesReq, jspb.Message);
84
85
  if (goog.DEBUG && !COMPILED) {
85
86
  /**
86
87
  * @public
87
88
  * @override
88
89
  */
89
- proto.FileUploadReq.displayName = 'proto.FileUploadReq';
90
+ proto.FileUploadReferencesReq.displayName = 'proto.FileUploadReferencesReq';
90
91
  }
91
92
  /**
92
93
  * Generated by JsPbCodeGenerator.
@@ -98,16 +99,16 @@ if (goog.DEBUG && !COMPILED) {
98
99
  * @extends {jspb.Message}
99
100
  * @constructor
100
101
  */
101
- proto.SaveFileRequest = function(opt_data) {
102
- jspb.Message.initialize(this, opt_data, 0, -1, proto.SaveFileRequest.repeatedFields_, null);
102
+ proto.FileUploadRes = function(opt_data) {
103
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
103
104
  };
104
- goog.inherits(proto.SaveFileRequest, jspb.Message);
105
+ goog.inherits(proto.FileUploadRes, jspb.Message);
105
106
  if (goog.DEBUG && !COMPILED) {
106
107
  /**
107
108
  * @public
108
109
  * @override
109
110
  */
110
- proto.SaveFileRequest.displayName = 'proto.SaveFileRequest';
111
+ proto.FileUploadRes.displayName = 'proto.FileUploadRes';
111
112
  }
112
113
 
113
114
 
@@ -125,8 +126,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
125
126
  * http://goto/soy-param-migration
126
127
  * @return {!Object}
127
128
  */
128
- proto.FileUploadRequest.prototype.toObject = function(opt_includeInstance) {
129
- return proto.FileUploadRequest.toObject(opt_includeInstance, this);
129
+ proto.FileInfo.prototype.toObject = function(opt_includeInstance) {
130
+ return proto.FileInfo.toObject(opt_includeInstance, this);
130
131
  };
131
132
 
132
133
 
@@ -135,15 +136,13 @@ proto.FileUploadRequest.prototype.toObject = function(opt_includeInstance) {
135
136
  * @param {boolean|undefined} includeInstance Deprecated. Whether to include
136
137
  * the JSPB instance for transitional soy proto support:
137
138
  * http://goto/soy-param-migration
138
- * @param {!proto.FileUploadRequest} msg The msg instance to transform.
139
+ * @param {!proto.FileInfo} msg The msg instance to transform.
139
140
  * @return {!Object}
140
141
  * @suppress {unusedLocalVariables} f is only used for nested messages
141
142
  */
142
- proto.FileUploadRequest.toObject = function(includeInstance, msg) {
143
+ proto.FileInfo.toObject = function(includeInstance, msg) {
143
144
  var f, obj = {
144
- fileName: jspb.Message.getFieldWithDefault(msg, 1, ""),
145
- chunk: msg.getChunk_asB64(),
146
- documentReferences: jspb.Message.getFieldWithDefault(msg, 3, "")
145
+ fileName: jspb.Message.getFieldWithDefault(msg, 1, "")
147
146
  };
148
147
 
149
148
  if (includeInstance) {
@@ -157,23 +156,23 @@ documentReferences: jspb.Message.getFieldWithDefault(msg, 3, "")
157
156
  /**
158
157
  * Deserializes binary data (in protobuf wire format).
159
158
  * @param {jspb.ByteSource} bytes The bytes to deserialize.
160
- * @return {!proto.FileUploadRequest}
159
+ * @return {!proto.FileInfo}
161
160
  */
162
- proto.FileUploadRequest.deserializeBinary = function(bytes) {
161
+ proto.FileInfo.deserializeBinary = function(bytes) {
163
162
  var reader = new jspb.BinaryReader(bytes);
164
- var msg = new proto.FileUploadRequest;
165
- return proto.FileUploadRequest.deserializeBinaryFromReader(msg, reader);
163
+ var msg = new proto.FileInfo;
164
+ return proto.FileInfo.deserializeBinaryFromReader(msg, reader);
166
165
  };
167
166
 
168
167
 
169
168
  /**
170
169
  * Deserializes binary data (in protobuf wire format) from the
171
170
  * given reader into the given message object.
172
- * @param {!proto.FileUploadRequest} msg The message object to deserialize into.
171
+ * @param {!proto.FileInfo} msg The message object to deserialize into.
173
172
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
174
- * @return {!proto.FileUploadRequest}
173
+ * @return {!proto.FileInfo}
175
174
  */
176
- proto.FileUploadRequest.deserializeBinaryFromReader = function(msg, reader) {
175
+ proto.FileInfo.deserializeBinaryFromReader = function(msg, reader) {
177
176
  while (reader.nextField()) {
178
177
  if (reader.isEndGroup()) {
179
178
  break;
@@ -184,14 +183,6 @@ proto.FileUploadRequest.deserializeBinaryFromReader = function(msg, reader) {
184
183
  var value = /** @type {string} */ (reader.readString());
185
184
  msg.setFileName(value);
186
185
  break;
187
- case 2:
188
- var value = /** @type {!Uint8Array} */ (reader.readBytes());
189
- msg.setChunk(value);
190
- break;
191
- case 3:
192
- var value = /** @type {string} */ (reader.readString());
193
- msg.setDocumentReferences(value);
194
- break;
195
186
  default:
196
187
  reader.skipField();
197
188
  break;
@@ -205,9 +196,9 @@ proto.FileUploadRequest.deserializeBinaryFromReader = function(msg, reader) {
205
196
  * Serializes the message to binary data (in protobuf wire format).
206
197
  * @return {!Uint8Array}
207
198
  */
208
- proto.FileUploadRequest.prototype.serializeBinary = function() {
199
+ proto.FileInfo.prototype.serializeBinary = function() {
209
200
  var writer = new jspb.BinaryWriter();
210
- proto.FileUploadRequest.serializeBinaryToWriter(this, writer);
201
+ proto.FileInfo.serializeBinaryToWriter(this, writer);
211
202
  return writer.getResultBuffer();
212
203
  };
213
204
 
@@ -215,11 +206,11 @@ proto.FileUploadRequest.prototype.serializeBinary = function() {
215
206
  /**
216
207
  * Serializes the given message to binary data (in protobuf wire
217
208
  * format), writing to the given BinaryWriter.
218
- * @param {!proto.FileUploadRequest} message
209
+ * @param {!proto.FileInfo} message
219
210
  * @param {!jspb.BinaryWriter} writer
220
211
  * @suppress {unusedLocalVariables} f is only used for nested messages
221
212
  */
222
- proto.FileUploadRequest.serializeBinaryToWriter = function(message, writer) {
213
+ proto.FileInfo.serializeBinaryToWriter = function(message, writer) {
223
214
  var f = undefined;
224
215
  f = message.getFileName();
225
216
  if (f.length > 0) {
@@ -228,20 +219,6 @@ proto.FileUploadRequest.serializeBinaryToWriter = function(message, writer) {
228
219
  f
229
220
  );
230
221
  }
231
- f = message.getChunk_asU8();
232
- if (f.length > 0) {
233
- writer.writeBytes(
234
- 2,
235
- f
236
- );
237
- }
238
- f = message.getDocumentReferences();
239
- if (f.length > 0) {
240
- writer.writeString(
241
- 3,
242
- f
243
- );
244
- }
245
222
  };
246
223
 
247
224
 
@@ -249,90 +226,49 @@ proto.FileUploadRequest.serializeBinaryToWriter = function(message, writer) {
249
226
  * optional string file_name = 1;
250
227
  * @return {string}
251
228
  */
252
- proto.FileUploadRequest.prototype.getFileName = function() {
229
+ proto.FileInfo.prototype.getFileName = function() {
253
230
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
254
231
  };
255
232
 
256
233
 
257
234
  /**
258
235
  * @param {string} value
259
- * @return {!proto.FileUploadRequest} returns this
236
+ * @return {!proto.FileInfo} returns this
260
237
  */
261
- proto.FileUploadRequest.prototype.setFileName = function(value) {
238
+ proto.FileInfo.prototype.setFileName = function(value) {
262
239
  return jspb.Message.setProto3StringField(this, 1, value);
263
240
  };
264
241
 
265
242
 
266
- /**
267
- * optional bytes chunk = 2;
268
- * @return {!(string|Uint8Array)}
269
- */
270
- proto.FileUploadRequest.prototype.getChunk = function() {
271
- return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
272
- };
273
-
274
-
275
- /**
276
- * optional bytes chunk = 2;
277
- * This is a type-conversion wrapper around `getChunk()`
278
- * @return {string}
279
- */
280
- proto.FileUploadRequest.prototype.getChunk_asB64 = function() {
281
- return /** @type {string} */ (jspb.Message.bytesAsB64(
282
- this.getChunk()));
283
- };
284
-
285
243
 
286
244
  /**
287
- * optional bytes chunk = 2;
288
- * Note that Uint8Array is not supported on all browsers.
289
- * @see http://caniuse.com/Uint8Array
290
- * This is a type-conversion wrapper around `getChunk()`
291
- * @return {!Uint8Array}
292
- */
293
- proto.FileUploadRequest.prototype.getChunk_asU8 = function() {
294
- return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
295
- this.getChunk()));
296
- };
297
-
298
-
299
- /**
300
- * @param {!(string|Uint8Array)} value
301
- * @return {!proto.FileUploadRequest} returns this
245
+ * Oneof group definitions for this message. Each group defines the field
246
+ * numbers belonging to that group. When of these fields' value is set, all
247
+ * other fields in the group are cleared. During deserialization, if multiple
248
+ * fields are encountered for a group, only the last value seen will be kept.
249
+ * @private {!Array<!Array<number>>}
250
+ * @const
302
251
  */
303
- proto.FileUploadRequest.prototype.setChunk = function(value) {
304
- return jspb.Message.setProto3BytesField(this, 2, value);
305
- };
306
-
252
+ proto.FileUploadReq.oneofGroups_ = [[1,2]];
307
253
 
308
254
  /**
309
- * optional string document_references = 3;
310
- * @return {string}
255
+ * @enum {number}
311
256
  */
312
- proto.FileUploadRequest.prototype.getDocumentReferences = function() {
313
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
257
+ proto.FileUploadReq.DataCase = {
258
+ DATA_NOT_SET: 0,
259
+ INFO: 1,
260
+ CHUNK_DATA: 2
314
261
  };
315
262
 
316
-
317
263
  /**
318
- * @param {string} value
319
- * @return {!proto.FileUploadRequest} returns this
264
+ * @return {proto.FileUploadReq.DataCase}
320
265
  */
321
- proto.FileUploadRequest.prototype.setDocumentReferences = function(value) {
322
- return jspb.Message.setProto3StringField(this, 3, value);
266
+ proto.FileUploadReq.prototype.getDataCase = function() {
267
+ return /** @type {proto.FileUploadReq.DataCase} */(jspb.Message.computeOneofCase(this, proto.FileUploadReq.oneofGroups_[0]));
323
268
  };
324
269
 
325
270
 
326
271
 
327
- /**
328
- * List of repeated fields within this message type.
329
- * @private {!Array<number>}
330
- * @const
331
- */
332
- proto.FileUploadResponse.repeatedFields_ = [1];
333
-
334
-
335
-
336
272
  if (jspb.Message.GENERATE_TO_OBJECT) {
337
273
  /**
338
274
  * Creates an object representation of this proto.
@@ -346,8 +282,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
346
282
  * http://goto/soy-param-migration
347
283
  * @return {!Object}
348
284
  */
349
- proto.FileUploadResponse.prototype.toObject = function(opt_includeInstance) {
350
- return proto.FileUploadResponse.toObject(opt_includeInstance, this);
285
+ proto.FileUploadReq.prototype.toObject = function(opt_includeInstance) {
286
+ return proto.FileUploadReq.toObject(opt_includeInstance, this);
351
287
  };
352
288
 
353
289
 
@@ -356,14 +292,14 @@ proto.FileUploadResponse.prototype.toObject = function(opt_includeInstance) {
356
292
  * @param {boolean|undefined} includeInstance Deprecated. Whether to include
357
293
  * the JSPB instance for transitional soy proto support:
358
294
  * http://goto/soy-param-migration
359
- * @param {!proto.FileUploadResponse} msg The msg instance to transform.
295
+ * @param {!proto.FileUploadReq} msg The msg instance to transform.
360
296
  * @return {!Object}
361
297
  * @suppress {unusedLocalVariables} f is only used for nested messages
362
298
  */
363
- proto.FileUploadResponse.toObject = function(includeInstance, msg) {
299
+ proto.FileUploadReq.toObject = function(includeInstance, msg) {
364
300
  var f, obj = {
365
- fileIdList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
366
- message: jspb.Message.getFieldWithDefault(msg, 2, "")
301
+ info: (f = msg.getInfo()) && proto.FileInfo.toObject(includeInstance, f),
302
+ chunkData: msg.getChunkData_asB64()
367
303
  };
368
304
 
369
305
  if (includeInstance) {
@@ -377,23 +313,23 @@ message: jspb.Message.getFieldWithDefault(msg, 2, "")
377
313
  /**
378
314
  * Deserializes binary data (in protobuf wire format).
379
315
  * @param {jspb.ByteSource} bytes The bytes to deserialize.
380
- * @return {!proto.FileUploadResponse}
316
+ * @return {!proto.FileUploadReq}
381
317
  */
382
- proto.FileUploadResponse.deserializeBinary = function(bytes) {
318
+ proto.FileUploadReq.deserializeBinary = function(bytes) {
383
319
  var reader = new jspb.BinaryReader(bytes);
384
- var msg = new proto.FileUploadResponse;
385
- return proto.FileUploadResponse.deserializeBinaryFromReader(msg, reader);
320
+ var msg = new proto.FileUploadReq;
321
+ return proto.FileUploadReq.deserializeBinaryFromReader(msg, reader);
386
322
  };
387
323
 
388
324
 
389
325
  /**
390
326
  * Deserializes binary data (in protobuf wire format) from the
391
327
  * given reader into the given message object.
392
- * @param {!proto.FileUploadResponse} msg The message object to deserialize into.
328
+ * @param {!proto.FileUploadReq} msg The message object to deserialize into.
393
329
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
394
- * @return {!proto.FileUploadResponse}
330
+ * @return {!proto.FileUploadReq}
395
331
  */
396
- proto.FileUploadResponse.deserializeBinaryFromReader = function(msg, reader) {
332
+ proto.FileUploadReq.deserializeBinaryFromReader = function(msg, reader) {
397
333
  while (reader.nextField()) {
398
334
  if (reader.isEndGroup()) {
399
335
  break;
@@ -401,14 +337,13 @@ proto.FileUploadResponse.deserializeBinaryFromReader = function(msg, reader) {
401
337
  var field = reader.getFieldNumber();
402
338
  switch (field) {
403
339
  case 1:
404
- var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]);
405
- for (var i = 0; i < values.length; i++) {
406
- msg.addFileId(values[i]);
407
- }
340
+ var value = new proto.FileInfo;
341
+ reader.readMessage(value,proto.FileInfo.deserializeBinaryFromReader);
342
+ msg.setInfo(value);
408
343
  break;
409
344
  case 2:
410
- var value = /** @type {string} */ (reader.readString());
411
- msg.setMessage(value);
345
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
346
+ msg.setChunkData(value);
412
347
  break;
413
348
  default:
414
349
  reader.skipField();
@@ -423,9 +358,9 @@ proto.FileUploadResponse.deserializeBinaryFromReader = function(msg, reader) {
423
358
  * Serializes the message to binary data (in protobuf wire format).
424
359
  * @return {!Uint8Array}
425
360
  */
426
- proto.FileUploadResponse.prototype.serializeBinary = function() {
361
+ proto.FileUploadReq.prototype.serializeBinary = function() {
427
362
  var writer = new jspb.BinaryWriter();
428
- proto.FileUploadResponse.serializeBinaryToWriter(this, writer);
363
+ proto.FileUploadReq.serializeBinaryToWriter(this, writer);
429
364
  return writer.getResultBuffer();
430
365
  };
431
366
 
@@ -433,22 +368,23 @@ proto.FileUploadResponse.prototype.serializeBinary = function() {
433
368
  /**
434
369
  * Serializes the given message to binary data (in protobuf wire
435
370
  * format), writing to the given BinaryWriter.
436
- * @param {!proto.FileUploadResponse} message
371
+ * @param {!proto.FileUploadReq} message
437
372
  * @param {!jspb.BinaryWriter} writer
438
373
  * @suppress {unusedLocalVariables} f is only used for nested messages
439
374
  */
440
- proto.FileUploadResponse.serializeBinaryToWriter = function(message, writer) {
375
+ proto.FileUploadReq.serializeBinaryToWriter = function(message, writer) {
441
376
  var f = undefined;
442
- f = message.getFileIdList();
443
- if (f.length > 0) {
444
- writer.writePackedInt32(
377
+ f = message.getInfo();
378
+ if (f != null) {
379
+ writer.writeMessage(
445
380
  1,
446
- f
381
+ f,
382
+ proto.FileInfo.serializeBinaryToWriter
447
383
  );
448
384
  }
449
- f = message.getMessage();
450
- if (f.length > 0) {
451
- writer.writeString(
385
+ f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2));
386
+ if (f != null) {
387
+ writer.writeBytes(
452
388
  2,
453
389
  f
454
390
  );
@@ -457,57 +393,99 @@ proto.FileUploadResponse.serializeBinaryToWriter = function(message, writer) {
457
393
 
458
394
 
459
395
  /**
460
- * repeated int32 file_id = 1;
461
- * @return {!Array<number>}
396
+ * optional FileInfo info = 1;
397
+ * @return {?proto.FileInfo}
462
398
  */
463
- proto.FileUploadResponse.prototype.getFileIdList = function() {
464
- return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 1));
399
+ proto.FileUploadReq.prototype.getInfo = function() {
400
+ return /** @type{?proto.FileInfo} */ (
401
+ jspb.Message.getWrapperField(this, proto.FileInfo, 1));
465
402
  };
466
403
 
467
404
 
468
405
  /**
469
- * @param {!Array<number>} value
470
- * @return {!proto.FileUploadResponse} returns this
406
+ * @param {?proto.FileInfo|undefined} value
407
+ * @return {!proto.FileUploadReq} returns this
408
+ */
409
+ proto.FileUploadReq.prototype.setInfo = function(value) {
410
+ return jspb.Message.setOneofWrapperField(this, 1, proto.FileUploadReq.oneofGroups_[0], value);
411
+ };
412
+
413
+
414
+ /**
415
+ * Clears the message field making it undefined.
416
+ * @return {!proto.FileUploadReq} returns this
471
417
  */
472
- proto.FileUploadResponse.prototype.setFileIdList = function(value) {
473
- return jspb.Message.setField(this, 1, value || []);
418
+ proto.FileUploadReq.prototype.clearInfo = function() {
419
+ return this.setInfo(undefined);
474
420
  };
475
421
 
476
422
 
477
423
  /**
478
- * @param {number} value
479
- * @param {number=} opt_index
480
- * @return {!proto.FileUploadResponse} returns this
424
+ * Returns whether this field is set.
425
+ * @return {boolean}
481
426
  */
482
- proto.FileUploadResponse.prototype.addFileId = function(value, opt_index) {
483
- return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
427
+ proto.FileUploadReq.prototype.hasInfo = function() {
428
+ return jspb.Message.getField(this, 1) != null;
484
429
  };
485
430
 
486
431
 
487
432
  /**
488
- * Clears the list making it empty but non-null.
489
- * @return {!proto.FileUploadResponse} returns this
433
+ * optional bytes chunk_data = 2;
434
+ * @return {!(string|Uint8Array)}
490
435
  */
491
- proto.FileUploadResponse.prototype.clearFileIdList = function() {
492
- return this.setFileIdList([]);
436
+ proto.FileUploadReq.prototype.getChunkData = function() {
437
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
493
438
  };
494
439
 
495
440
 
496
441
  /**
497
- * optional string message = 2;
442
+ * optional bytes chunk_data = 2;
443
+ * This is a type-conversion wrapper around `getChunkData()`
498
444
  * @return {string}
499
445
  */
500
- proto.FileUploadResponse.prototype.getMessage = function() {
501
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
446
+ proto.FileUploadReq.prototype.getChunkData_asB64 = function() {
447
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
448
+ this.getChunkData()));
502
449
  };
503
450
 
504
451
 
505
452
  /**
506
- * @param {string} value
507
- * @return {!proto.FileUploadResponse} returns this
453
+ * optional bytes chunk_data = 2;
454
+ * Note that Uint8Array is not supported on all browsers.
455
+ * @see http://caniuse.com/Uint8Array
456
+ * This is a type-conversion wrapper around `getChunkData()`
457
+ * @return {!Uint8Array}
508
458
  */
509
- proto.FileUploadResponse.prototype.setMessage = function(value) {
510
- return jspb.Message.setProto3StringField(this, 2, value);
459
+ proto.FileUploadReq.prototype.getChunkData_asU8 = function() {
460
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
461
+ this.getChunkData()));
462
+ };
463
+
464
+
465
+ /**
466
+ * @param {!(string|Uint8Array)} value
467
+ * @return {!proto.FileUploadReq} returns this
468
+ */
469
+ proto.FileUploadReq.prototype.setChunkData = function(value) {
470
+ return jspb.Message.setOneofField(this, 2, proto.FileUploadReq.oneofGroups_[0], value);
471
+ };
472
+
473
+
474
+ /**
475
+ * Clears the field making it undefined.
476
+ * @return {!proto.FileUploadReq} returns this
477
+ */
478
+ proto.FileUploadReq.prototype.clearChunkData = function() {
479
+ return jspb.Message.setOneofField(this, 2, proto.FileUploadReq.oneofGroups_[0], undefined);
480
+ };
481
+
482
+
483
+ /**
484
+ * Returns whether this field is set.
485
+ * @return {boolean}
486
+ */
487
+ proto.FileUploadReq.prototype.hasChunkData = function() {
488
+ return jspb.Message.getField(this, 2) != null;
511
489
  };
512
490
 
513
491
 
@@ -527,8 +505,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
527
505
  * http://goto/soy-param-migration
528
506
  * @return {!Object}
529
507
  */
530
- proto.FileUploadReq.prototype.toObject = function(opt_includeInstance) {
531
- return proto.FileUploadReq.toObject(opt_includeInstance, this);
508
+ proto.FileUploadReferencesReq.prototype.toObject = function(opt_includeInstance) {
509
+ return proto.FileUploadReferencesReq.toObject(opt_includeInstance, this);
532
510
  };
533
511
 
534
512
 
@@ -537,15 +515,15 @@ proto.FileUploadReq.prototype.toObject = function(opt_includeInstance) {
537
515
  * @param {boolean|undefined} includeInstance Deprecated. Whether to include
538
516
  * the JSPB instance for transitional soy proto support:
539
517
  * http://goto/soy-param-migration
540
- * @param {!proto.FileUploadReq} msg The msg instance to transform.
518
+ * @param {!proto.FileUploadReferencesReq} msg The msg instance to transform.
541
519
  * @return {!Object}
542
520
  * @suppress {unusedLocalVariables} f is only used for nested messages
543
521
  */
544
- proto.FileUploadReq.toObject = function(includeInstance, msg) {
522
+ proto.FileUploadReferencesReq.toObject = function(includeInstance, msg) {
545
523
  var f, obj = {
546
- description: jspb.Message.getFieldWithDefault(msg, 1, ""),
547
- name: jspb.Message.getFieldWithDefault(msg, 2, ""),
548
- url: jspb.Message.getFieldWithDefault(msg, 3, "")
524
+ referencesId: jspb.Message.getFieldWithDefault(msg, 1, ""),
525
+ url: jspb.Message.getFieldWithDefault(msg, 2, ""),
526
+ fileName: jspb.Message.getFieldWithDefault(msg, 3, "")
549
527
  };
550
528
 
551
529
  if (includeInstance) {
@@ -559,23 +537,23 @@ url: jspb.Message.getFieldWithDefault(msg, 3, "")
559
537
  /**
560
538
  * Deserializes binary data (in protobuf wire format).
561
539
  * @param {jspb.ByteSource} bytes The bytes to deserialize.
562
- * @return {!proto.FileUploadReq}
540
+ * @return {!proto.FileUploadReferencesReq}
563
541
  */
564
- proto.FileUploadReq.deserializeBinary = function(bytes) {
542
+ proto.FileUploadReferencesReq.deserializeBinary = function(bytes) {
565
543
  var reader = new jspb.BinaryReader(bytes);
566
- var msg = new proto.FileUploadReq;
567
- return proto.FileUploadReq.deserializeBinaryFromReader(msg, reader);
544
+ var msg = new proto.FileUploadReferencesReq;
545
+ return proto.FileUploadReferencesReq.deserializeBinaryFromReader(msg, reader);
568
546
  };
569
547
 
570
548
 
571
549
  /**
572
550
  * Deserializes binary data (in protobuf wire format) from the
573
551
  * given reader into the given message object.
574
- * @param {!proto.FileUploadReq} msg The message object to deserialize into.
552
+ * @param {!proto.FileUploadReferencesReq} msg The message object to deserialize into.
575
553
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
576
- * @return {!proto.FileUploadReq}
554
+ * @return {!proto.FileUploadReferencesReq}
577
555
  */
578
- proto.FileUploadReq.deserializeBinaryFromReader = function(msg, reader) {
556
+ proto.FileUploadReferencesReq.deserializeBinaryFromReader = function(msg, reader) {
579
557
  while (reader.nextField()) {
580
558
  if (reader.isEndGroup()) {
581
559
  break;
@@ -584,15 +562,15 @@ proto.FileUploadReq.deserializeBinaryFromReader = function(msg, reader) {
584
562
  switch (field) {
585
563
  case 1:
586
564
  var value = /** @type {string} */ (reader.readString());
587
- msg.setDescription(value);
565
+ msg.setReferencesId(value);
588
566
  break;
589
567
  case 2:
590
568
  var value = /** @type {string} */ (reader.readString());
591
- msg.setName(value);
569
+ msg.setUrl(value);
592
570
  break;
593
571
  case 3:
594
572
  var value = /** @type {string} */ (reader.readString());
595
- msg.setUrl(value);
573
+ msg.setFileName(value);
596
574
  break;
597
575
  default:
598
576
  reader.skipField();
@@ -607,9 +585,9 @@ proto.FileUploadReq.deserializeBinaryFromReader = function(msg, reader) {
607
585
  * Serializes the message to binary data (in protobuf wire format).
608
586
  * @return {!Uint8Array}
609
587
  */
610
- proto.FileUploadReq.prototype.serializeBinary = function() {
588
+ proto.FileUploadReferencesReq.prototype.serializeBinary = function() {
611
589
  var writer = new jspb.BinaryWriter();
612
- proto.FileUploadReq.serializeBinaryToWriter(this, writer);
590
+ proto.FileUploadReferencesReq.serializeBinaryToWriter(this, writer);
613
591
  return writer.getResultBuffer();
614
592
  };
615
593
 
@@ -617,27 +595,27 @@ proto.FileUploadReq.prototype.serializeBinary = function() {
617
595
  /**
618
596
  * Serializes the given message to binary data (in protobuf wire
619
597
  * format), writing to the given BinaryWriter.
620
- * @param {!proto.FileUploadReq} message
598
+ * @param {!proto.FileUploadReferencesReq} message
621
599
  * @param {!jspb.BinaryWriter} writer
622
600
  * @suppress {unusedLocalVariables} f is only used for nested messages
623
601
  */
624
- proto.FileUploadReq.serializeBinaryToWriter = function(message, writer) {
602
+ proto.FileUploadReferencesReq.serializeBinaryToWriter = function(message, writer) {
625
603
  var f = undefined;
626
- f = message.getDescription();
604
+ f = message.getReferencesId();
627
605
  if (f.length > 0) {
628
606
  writer.writeString(
629
607
  1,
630
608
  f
631
609
  );
632
610
  }
633
- f = message.getName();
611
+ f = message.getUrl();
634
612
  if (f.length > 0) {
635
613
  writer.writeString(
636
614
  2,
637
615
  f
638
616
  );
639
617
  }
640
- f = message.getUrl();
618
+ f = message.getFileName();
641
619
  if (f.length > 0) {
642
620
  writer.writeString(
643
621
  3,
@@ -648,67 +626,60 @@ proto.FileUploadReq.serializeBinaryToWriter = function(message, writer) {
648
626
 
649
627
 
650
628
  /**
651
- * optional string description = 1;
629
+ * optional string references_id = 1;
652
630
  * @return {string}
653
631
  */
654
- proto.FileUploadReq.prototype.getDescription = function() {
632
+ proto.FileUploadReferencesReq.prototype.getReferencesId = function() {
655
633
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
656
634
  };
657
635
 
658
636
 
659
637
  /**
660
638
  * @param {string} value
661
- * @return {!proto.FileUploadReq} returns this
639
+ * @return {!proto.FileUploadReferencesReq} returns this
662
640
  */
663
- proto.FileUploadReq.prototype.setDescription = function(value) {
641
+ proto.FileUploadReferencesReq.prototype.setReferencesId = function(value) {
664
642
  return jspb.Message.setProto3StringField(this, 1, value);
665
643
  };
666
644
 
667
645
 
668
646
  /**
669
- * optional string name = 2;
647
+ * optional string url = 2;
670
648
  * @return {string}
671
649
  */
672
- proto.FileUploadReq.prototype.getName = function() {
650
+ proto.FileUploadReferencesReq.prototype.getUrl = function() {
673
651
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
674
652
  };
675
653
 
676
654
 
677
655
  /**
678
656
  * @param {string} value
679
- * @return {!proto.FileUploadReq} returns this
657
+ * @return {!proto.FileUploadReferencesReq} returns this
680
658
  */
681
- proto.FileUploadReq.prototype.setName = function(value) {
659
+ proto.FileUploadReferencesReq.prototype.setUrl = function(value) {
682
660
  return jspb.Message.setProto3StringField(this, 2, value);
683
661
  };
684
662
 
685
663
 
686
664
  /**
687
- * optional string url = 3;
665
+ * optional string file_name = 3;
688
666
  * @return {string}
689
667
  */
690
- proto.FileUploadReq.prototype.getUrl = function() {
668
+ proto.FileUploadReferencesReq.prototype.getFileName = function() {
691
669
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
692
670
  };
693
671
 
694
672
 
695
673
  /**
696
674
  * @param {string} value
697
- * @return {!proto.FileUploadReq} returns this
675
+ * @return {!proto.FileUploadReferencesReq} returns this
698
676
  */
699
- proto.FileUploadReq.prototype.setUrl = function(value) {
677
+ proto.FileUploadReferencesReq.prototype.setFileName = function(value) {
700
678
  return jspb.Message.setProto3StringField(this, 3, value);
701
679
  };
702
680
 
703
681
 
704
682
 
705
- /**
706
- * List of repeated fields within this message type.
707
- * @private {!Array<number>}
708
- * @const
709
- */
710
- proto.SaveFileRequest.repeatedFields_ = [1];
711
-
712
683
 
713
684
 
714
685
  if (jspb.Message.GENERATE_TO_OBJECT) {
@@ -724,8 +695,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
724
695
  * http://goto/soy-param-migration
725
696
  * @return {!Object}
726
697
  */
727
- proto.SaveFileRequest.prototype.toObject = function(opt_includeInstance) {
728
- return proto.SaveFileRequest.toObject(opt_includeInstance, this);
698
+ proto.FileUploadRes.prototype.toObject = function(opt_includeInstance) {
699
+ return proto.FileUploadRes.toObject(opt_includeInstance, this);
729
700
  };
730
701
 
731
702
 
@@ -734,14 +705,15 @@ proto.SaveFileRequest.prototype.toObject = function(opt_includeInstance) {
734
705
  * @param {boolean|undefined} includeInstance Deprecated. Whether to include
735
706
  * the JSPB instance for transitional soy proto support:
736
707
  * http://goto/soy-param-migration
737
- * @param {!proto.SaveFileRequest} msg The msg instance to transform.
708
+ * @param {!proto.FileUploadRes} msg The msg instance to transform.
738
709
  * @return {!Object}
739
710
  * @suppress {unusedLocalVariables} f is only used for nested messages
740
711
  */
741
- proto.SaveFileRequest.toObject = function(includeInstance, msg) {
712
+ proto.FileUploadRes.toObject = function(includeInstance, msg) {
742
713
  var f, obj = {
743
- urlsList: jspb.Message.toObjectList(msg.getUrlsList(),
744
- proto.FileUploadReq.toObject, includeInstance)
714
+ referencesId: jspb.Message.getFieldWithDefault(msg, 1, ""),
715
+ url: jspb.Message.getFieldWithDefault(msg, 2, ""),
716
+ fileName: jspb.Message.getFieldWithDefault(msg, 3, "")
745
717
  };
746
718
 
747
719
  if (includeInstance) {
@@ -755,23 +727,23 @@ urlsList: jspb.Message.toObjectList(msg.getUrlsList(),
755
727
  /**
756
728
  * Deserializes binary data (in protobuf wire format).
757
729
  * @param {jspb.ByteSource} bytes The bytes to deserialize.
758
- * @return {!proto.SaveFileRequest}
730
+ * @return {!proto.FileUploadRes}
759
731
  */
760
- proto.SaveFileRequest.deserializeBinary = function(bytes) {
732
+ proto.FileUploadRes.deserializeBinary = function(bytes) {
761
733
  var reader = new jspb.BinaryReader(bytes);
762
- var msg = new proto.SaveFileRequest;
763
- return proto.SaveFileRequest.deserializeBinaryFromReader(msg, reader);
734
+ var msg = new proto.FileUploadRes;
735
+ return proto.FileUploadRes.deserializeBinaryFromReader(msg, reader);
764
736
  };
765
737
 
766
738
 
767
739
  /**
768
740
  * Deserializes binary data (in protobuf wire format) from the
769
741
  * given reader into the given message object.
770
- * @param {!proto.SaveFileRequest} msg The message object to deserialize into.
742
+ * @param {!proto.FileUploadRes} msg The message object to deserialize into.
771
743
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
772
- * @return {!proto.SaveFileRequest}
744
+ * @return {!proto.FileUploadRes}
773
745
  */
774
- proto.SaveFileRequest.deserializeBinaryFromReader = function(msg, reader) {
746
+ proto.FileUploadRes.deserializeBinaryFromReader = function(msg, reader) {
775
747
  while (reader.nextField()) {
776
748
  if (reader.isEndGroup()) {
777
749
  break;
@@ -779,9 +751,16 @@ proto.SaveFileRequest.deserializeBinaryFromReader = function(msg, reader) {
779
751
  var field = reader.getFieldNumber();
780
752
  switch (field) {
781
753
  case 1:
782
- var value = new proto.FileUploadReq;
783
- reader.readMessage(value,proto.FileUploadReq.deserializeBinaryFromReader);
784
- msg.addUrls(value);
754
+ var value = /** @type {string} */ (reader.readString());
755
+ msg.setReferencesId(value);
756
+ break;
757
+ case 2:
758
+ var value = /** @type {string} */ (reader.readString());
759
+ msg.setUrl(value);
760
+ break;
761
+ case 3:
762
+ var value = /** @type {string} */ (reader.readString());
763
+ msg.setFileName(value);
785
764
  break;
786
765
  default:
787
766
  reader.skipField();
@@ -796,9 +775,9 @@ proto.SaveFileRequest.deserializeBinaryFromReader = function(msg, reader) {
796
775
  * Serializes the message to binary data (in protobuf wire format).
797
776
  * @return {!Uint8Array}
798
777
  */
799
- proto.SaveFileRequest.prototype.serializeBinary = function() {
778
+ proto.FileUploadRes.prototype.serializeBinary = function() {
800
779
  var writer = new jspb.BinaryWriter();
801
- proto.SaveFileRequest.serializeBinaryToWriter(this, writer);
780
+ proto.FileUploadRes.serializeBinaryToWriter(this, writer);
802
781
  return writer.getResultBuffer();
803
782
  };
804
783
 
@@ -806,58 +785,87 @@ proto.SaveFileRequest.prototype.serializeBinary = function() {
806
785
  /**
807
786
  * Serializes the given message to binary data (in protobuf wire
808
787
  * format), writing to the given BinaryWriter.
809
- * @param {!proto.SaveFileRequest} message
788
+ * @param {!proto.FileUploadRes} message
810
789
  * @param {!jspb.BinaryWriter} writer
811
790
  * @suppress {unusedLocalVariables} f is only used for nested messages
812
791
  */
813
- proto.SaveFileRequest.serializeBinaryToWriter = function(message, writer) {
792
+ proto.FileUploadRes.serializeBinaryToWriter = function(message, writer) {
814
793
  var f = undefined;
815
- f = message.getUrlsList();
794
+ f = message.getReferencesId();
816
795
  if (f.length > 0) {
817
- writer.writeRepeatedMessage(
796
+ writer.writeString(
818
797
  1,
819
- f,
820
- proto.FileUploadReq.serializeBinaryToWriter
798
+ f
799
+ );
800
+ }
801
+ f = message.getUrl();
802
+ if (f.length > 0) {
803
+ writer.writeString(
804
+ 2,
805
+ f
806
+ );
807
+ }
808
+ f = message.getFileName();
809
+ if (f.length > 0) {
810
+ writer.writeString(
811
+ 3,
812
+ f
821
813
  );
822
814
  }
823
815
  };
824
816
 
825
817
 
826
818
  /**
827
- * repeated FileUploadReq urls = 1;
828
- * @return {!Array<!proto.FileUploadReq>}
819
+ * optional string references_id = 1;
820
+ * @return {string}
829
821
  */
830
- proto.SaveFileRequest.prototype.getUrlsList = function() {
831
- return /** @type{!Array<!proto.FileUploadReq>} */ (
832
- jspb.Message.getRepeatedWrapperField(this, proto.FileUploadReq, 1));
822
+ proto.FileUploadRes.prototype.getReferencesId = function() {
823
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
833
824
  };
834
825
 
835
826
 
836
827
  /**
837
- * @param {!Array<!proto.FileUploadReq>} value
838
- * @return {!proto.SaveFileRequest} returns this
839
- */
840
- proto.SaveFileRequest.prototype.setUrlsList = function(value) {
841
- return jspb.Message.setRepeatedWrapperField(this, 1, value);
828
+ * @param {string} value
829
+ * @return {!proto.FileUploadRes} returns this
830
+ */
831
+ proto.FileUploadRes.prototype.setReferencesId = function(value) {
832
+ return jspb.Message.setProto3StringField(this, 1, value);
842
833
  };
843
834
 
844
835
 
845
836
  /**
846
- * @param {!proto.FileUploadReq=} opt_value
847
- * @param {number=} opt_index
848
- * @return {!proto.FileUploadReq}
837
+ * optional string url = 2;
838
+ * @return {string}
839
+ */
840
+ proto.FileUploadRes.prototype.getUrl = function() {
841
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
842
+ };
843
+
844
+
845
+ /**
846
+ * @param {string} value
847
+ * @return {!proto.FileUploadRes} returns this
848
+ */
849
+ proto.FileUploadRes.prototype.setUrl = function(value) {
850
+ return jspb.Message.setProto3StringField(this, 2, value);
851
+ };
852
+
853
+
854
+ /**
855
+ * optional string file_name = 3;
856
+ * @return {string}
849
857
  */
850
- proto.SaveFileRequest.prototype.addUrls = function(opt_value, opt_index) {
851
- return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.FileUploadReq, opt_index);
858
+ proto.FileUploadRes.prototype.getFileName = function() {
859
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
852
860
  };
853
861
 
854
862
 
855
863
  /**
856
- * Clears the list making it empty but non-null.
857
- * @return {!proto.SaveFileRequest} returns this
864
+ * @param {string} value
865
+ * @return {!proto.FileUploadRes} returns this
858
866
  */
859
- proto.SaveFileRequest.prototype.clearUrlsList = function() {
860
- return this.setUrlsList([]);
867
+ proto.FileUploadRes.prototype.setFileName = function(value) {
868
+ return jspb.Message.setProto3StringField(this, 3, value);
861
869
  };
862
870
 
863
871