@aldiokta/protocgen 1.0.1 → 1.0.3

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.
@@ -0,0 +1,2340 @@
1
+ // source: prisca/v1/core/company/company.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {missingRequire} reports error on implicit type usages.
6
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
+ * field starts with 'MSG_' and isn't a translatable message.
8
+ * @public
9
+ */
10
+ // GENERATED CODE -- DO NOT EDIT!
11
+ /* eslint-disable */
12
+ // @ts-nocheck
13
+
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
16
+ var global =
17
+ (typeof globalThis !== 'undefined' && globalThis) ||
18
+ (typeof window !== 'undefined' && window) ||
19
+ (typeof global !== 'undefined' && global) ||
20
+ (typeof self !== 'undefined' && self) ||
21
+ (function () { return this; }).call(null) ||
22
+ Function('return this')();
23
+
24
+ var prisca_v1_global_meta_meta_pb = require('../../../../prisca/v1/global/meta/meta_pb.js');
25
+ goog.object.extend(proto, prisca_v1_global_meta_meta_pb);
26
+ goog.exportSymbol('proto.Company', null, global);
27
+ goog.exportSymbol('proto.CompanyGetByIdRequest', null, global);
28
+ goog.exportSymbol('proto.CompanyGetByIdResponse', null, global);
29
+ goog.exportSymbol('proto.CreateCompanyRequest', null, global);
30
+ goog.exportSymbol('proto.CreateCompanyResponse', null, global);
31
+ goog.exportSymbol('proto.DeleteCompanyRequest', null, global);
32
+ goog.exportSymbol('proto.DeleteCompanyResponse', null, global);
33
+ goog.exportSymbol('proto.GetListCompanyRequest', null, global);
34
+ goog.exportSymbol('proto.GetListCompanyResponse', null, global);
35
+ goog.exportSymbol('proto.UpdateCompanyRequest', null, global);
36
+ goog.exportSymbol('proto.UpdateCompanyResponse', null, global);
37
+ /**
38
+ * Generated by JsPbCodeGenerator.
39
+ * @param {Array=} opt_data Optional initial data array, typically from a
40
+ * server response, or constructed directly in Javascript. The array is used
41
+ * in place and becomes part of the constructed object. It is not cloned.
42
+ * If no data is provided, the constructed object will be empty, but still
43
+ * valid.
44
+ * @extends {jspb.Message}
45
+ * @constructor
46
+ */
47
+ proto.Company = function(opt_data) {
48
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
49
+ };
50
+ goog.inherits(proto.Company, jspb.Message);
51
+ if (goog.DEBUG && !COMPILED) {
52
+ /**
53
+ * @public
54
+ * @override
55
+ */
56
+ proto.Company.displayName = 'proto.Company';
57
+ }
58
+ /**
59
+ * Generated by JsPbCodeGenerator.
60
+ * @param {Array=} opt_data Optional initial data array, typically from a
61
+ * server response, or constructed directly in Javascript. The array is used
62
+ * in place and becomes part of the constructed object. It is not cloned.
63
+ * If no data is provided, the constructed object will be empty, but still
64
+ * valid.
65
+ * @extends {jspb.Message}
66
+ * @constructor
67
+ */
68
+ proto.CompanyGetByIdRequest = function(opt_data) {
69
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
70
+ };
71
+ goog.inherits(proto.CompanyGetByIdRequest, jspb.Message);
72
+ if (goog.DEBUG && !COMPILED) {
73
+ /**
74
+ * @public
75
+ * @override
76
+ */
77
+ proto.CompanyGetByIdRequest.displayName = 'proto.CompanyGetByIdRequest';
78
+ }
79
+ /**
80
+ * Generated by JsPbCodeGenerator.
81
+ * @param {Array=} opt_data Optional initial data array, typically from a
82
+ * server response, or constructed directly in Javascript. The array is used
83
+ * in place and becomes part of the constructed object. It is not cloned.
84
+ * If no data is provided, the constructed object will be empty, but still
85
+ * valid.
86
+ * @extends {jspb.Message}
87
+ * @constructor
88
+ */
89
+ proto.CompanyGetByIdResponse = function(opt_data) {
90
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
91
+ };
92
+ goog.inherits(proto.CompanyGetByIdResponse, jspb.Message);
93
+ if (goog.DEBUG && !COMPILED) {
94
+ /**
95
+ * @public
96
+ * @override
97
+ */
98
+ proto.CompanyGetByIdResponse.displayName = 'proto.CompanyGetByIdResponse';
99
+ }
100
+ /**
101
+ * Generated by JsPbCodeGenerator.
102
+ * @param {Array=} opt_data Optional initial data array, typically from a
103
+ * server response, or constructed directly in Javascript. The array is used
104
+ * in place and becomes part of the constructed object. It is not cloned.
105
+ * If no data is provided, the constructed object will be empty, but still
106
+ * valid.
107
+ * @extends {jspb.Message}
108
+ * @constructor
109
+ */
110
+ proto.UpdateCompanyRequest = function(opt_data) {
111
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
112
+ };
113
+ goog.inherits(proto.UpdateCompanyRequest, jspb.Message);
114
+ if (goog.DEBUG && !COMPILED) {
115
+ /**
116
+ * @public
117
+ * @override
118
+ */
119
+ proto.UpdateCompanyRequest.displayName = 'proto.UpdateCompanyRequest';
120
+ }
121
+ /**
122
+ * Generated by JsPbCodeGenerator.
123
+ * @param {Array=} opt_data Optional initial data array, typically from a
124
+ * server response, or constructed directly in Javascript. The array is used
125
+ * in place and becomes part of the constructed object. It is not cloned.
126
+ * If no data is provided, the constructed object will be empty, but still
127
+ * valid.
128
+ * @extends {jspb.Message}
129
+ * @constructor
130
+ */
131
+ proto.UpdateCompanyResponse = function(opt_data) {
132
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
133
+ };
134
+ goog.inherits(proto.UpdateCompanyResponse, jspb.Message);
135
+ if (goog.DEBUG && !COMPILED) {
136
+ /**
137
+ * @public
138
+ * @override
139
+ */
140
+ proto.UpdateCompanyResponse.displayName = 'proto.UpdateCompanyResponse';
141
+ }
142
+ /**
143
+ * Generated by JsPbCodeGenerator.
144
+ * @param {Array=} opt_data Optional initial data array, typically from a
145
+ * server response, or constructed directly in Javascript. The array is used
146
+ * in place and becomes part of the constructed object. It is not cloned.
147
+ * If no data is provided, the constructed object will be empty, but still
148
+ * valid.
149
+ * @extends {jspb.Message}
150
+ * @constructor
151
+ */
152
+ proto.CreateCompanyRequest = function(opt_data) {
153
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
154
+ };
155
+ goog.inherits(proto.CreateCompanyRequest, jspb.Message);
156
+ if (goog.DEBUG && !COMPILED) {
157
+ /**
158
+ * @public
159
+ * @override
160
+ */
161
+ proto.CreateCompanyRequest.displayName = 'proto.CreateCompanyRequest';
162
+ }
163
+ /**
164
+ * Generated by JsPbCodeGenerator.
165
+ * @param {Array=} opt_data Optional initial data array, typically from a
166
+ * server response, or constructed directly in Javascript. The array is used
167
+ * in place and becomes part of the constructed object. It is not cloned.
168
+ * If no data is provided, the constructed object will be empty, but still
169
+ * valid.
170
+ * @extends {jspb.Message}
171
+ * @constructor
172
+ */
173
+ proto.CreateCompanyResponse = function(opt_data) {
174
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
175
+ };
176
+ goog.inherits(proto.CreateCompanyResponse, jspb.Message);
177
+ if (goog.DEBUG && !COMPILED) {
178
+ /**
179
+ * @public
180
+ * @override
181
+ */
182
+ proto.CreateCompanyResponse.displayName = 'proto.CreateCompanyResponse';
183
+ }
184
+ /**
185
+ * Generated by JsPbCodeGenerator.
186
+ * @param {Array=} opt_data Optional initial data array, typically from a
187
+ * server response, or constructed directly in Javascript. The array is used
188
+ * in place and becomes part of the constructed object. It is not cloned.
189
+ * If no data is provided, the constructed object will be empty, but still
190
+ * valid.
191
+ * @extends {jspb.Message}
192
+ * @constructor
193
+ */
194
+ proto.DeleteCompanyRequest = function(opt_data) {
195
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
196
+ };
197
+ goog.inherits(proto.DeleteCompanyRequest, jspb.Message);
198
+ if (goog.DEBUG && !COMPILED) {
199
+ /**
200
+ * @public
201
+ * @override
202
+ */
203
+ proto.DeleteCompanyRequest.displayName = 'proto.DeleteCompanyRequest';
204
+ }
205
+ /**
206
+ * Generated by JsPbCodeGenerator.
207
+ * @param {Array=} opt_data Optional initial data array, typically from a
208
+ * server response, or constructed directly in Javascript. The array is used
209
+ * in place and becomes part of the constructed object. It is not cloned.
210
+ * If no data is provided, the constructed object will be empty, but still
211
+ * valid.
212
+ * @extends {jspb.Message}
213
+ * @constructor
214
+ */
215
+ proto.DeleteCompanyResponse = function(opt_data) {
216
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
217
+ };
218
+ goog.inherits(proto.DeleteCompanyResponse, jspb.Message);
219
+ if (goog.DEBUG && !COMPILED) {
220
+ /**
221
+ * @public
222
+ * @override
223
+ */
224
+ proto.DeleteCompanyResponse.displayName = 'proto.DeleteCompanyResponse';
225
+ }
226
+ /**
227
+ * Generated by JsPbCodeGenerator.
228
+ * @param {Array=} opt_data Optional initial data array, typically from a
229
+ * server response, or constructed directly in Javascript. The array is used
230
+ * in place and becomes part of the constructed object. It is not cloned.
231
+ * If no data is provided, the constructed object will be empty, but still
232
+ * valid.
233
+ * @extends {jspb.Message}
234
+ * @constructor
235
+ */
236
+ proto.GetListCompanyRequest = function(opt_data) {
237
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
238
+ };
239
+ goog.inherits(proto.GetListCompanyRequest, jspb.Message);
240
+ if (goog.DEBUG && !COMPILED) {
241
+ /**
242
+ * @public
243
+ * @override
244
+ */
245
+ proto.GetListCompanyRequest.displayName = 'proto.GetListCompanyRequest';
246
+ }
247
+ /**
248
+ * Generated by JsPbCodeGenerator.
249
+ * @param {Array=} opt_data Optional initial data array, typically from a
250
+ * server response, or constructed directly in Javascript. The array is used
251
+ * in place and becomes part of the constructed object. It is not cloned.
252
+ * If no data is provided, the constructed object will be empty, but still
253
+ * valid.
254
+ * @extends {jspb.Message}
255
+ * @constructor
256
+ */
257
+ proto.GetListCompanyResponse = function(opt_data) {
258
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.GetListCompanyResponse.repeatedFields_, null);
259
+ };
260
+ goog.inherits(proto.GetListCompanyResponse, jspb.Message);
261
+ if (goog.DEBUG && !COMPILED) {
262
+ /**
263
+ * @public
264
+ * @override
265
+ */
266
+ proto.GetListCompanyResponse.displayName = 'proto.GetListCompanyResponse';
267
+ }
268
+
269
+
270
+
271
+ if (jspb.Message.GENERATE_TO_OBJECT) {
272
+ /**
273
+ * Creates an object representation of this proto.
274
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
275
+ * Optional fields that are not set will be set to undefined.
276
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
277
+ * For the list of reserved names please see:
278
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
279
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
280
+ * JSPB instance for transitional soy proto support:
281
+ * http://goto/soy-param-migration
282
+ * @return {!Object}
283
+ */
284
+ proto.Company.prototype.toObject = function(opt_includeInstance) {
285
+ return proto.Company.toObject(opt_includeInstance, this);
286
+ };
287
+
288
+
289
+ /**
290
+ * Static version of the {@see toObject} method.
291
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
292
+ * the JSPB instance for transitional soy proto support:
293
+ * http://goto/soy-param-migration
294
+ * @param {!proto.Company} msg The msg instance to transform.
295
+ * @return {!Object}
296
+ * @suppress {unusedLocalVariables} f is only used for nested messages
297
+ */
298
+ proto.Company.toObject = function(includeInstance, msg) {
299
+ var f, obj = {
300
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
301
+ code: jspb.Message.getFieldWithDefault(msg, 2, ""),
302
+ name: jspb.Message.getFieldWithDefault(msg, 3, ""),
303
+ currencyCode: jspb.Message.getFieldWithDefault(msg, 4, ""),
304
+ description: jspb.Message.getFieldWithDefault(msg, 5, ""),
305
+ parentRefId: jspb.Message.getFieldWithDefault(msg, 6, "")
306
+ };
307
+
308
+ if (includeInstance) {
309
+ obj.$jspbMessageInstance = msg;
310
+ }
311
+ return obj;
312
+ };
313
+ }
314
+
315
+
316
+ /**
317
+ * Deserializes binary data (in protobuf wire format).
318
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
319
+ * @return {!proto.Company}
320
+ */
321
+ proto.Company.deserializeBinary = function(bytes) {
322
+ var reader = new jspb.BinaryReader(bytes);
323
+ var msg = new proto.Company;
324
+ return proto.Company.deserializeBinaryFromReader(msg, reader);
325
+ };
326
+
327
+
328
+ /**
329
+ * Deserializes binary data (in protobuf wire format) from the
330
+ * given reader into the given message object.
331
+ * @param {!proto.Company} msg The message object to deserialize into.
332
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
333
+ * @return {!proto.Company}
334
+ */
335
+ proto.Company.deserializeBinaryFromReader = function(msg, reader) {
336
+ while (reader.nextField()) {
337
+ if (reader.isEndGroup()) {
338
+ break;
339
+ }
340
+ var field = reader.getFieldNumber();
341
+ switch (field) {
342
+ case 1:
343
+ var value = /** @type {number} */ (reader.readInt64());
344
+ msg.setId(value);
345
+ break;
346
+ case 2:
347
+ var value = /** @type {string} */ (reader.readString());
348
+ msg.setCode(value);
349
+ break;
350
+ case 3:
351
+ var value = /** @type {string} */ (reader.readString());
352
+ msg.setName(value);
353
+ break;
354
+ case 4:
355
+ var value = /** @type {string} */ (reader.readString());
356
+ msg.setCurrencyCode(value);
357
+ break;
358
+ case 5:
359
+ var value = /** @type {string} */ (reader.readString());
360
+ msg.setDescription(value);
361
+ break;
362
+ case 6:
363
+ var value = /** @type {string} */ (reader.readString());
364
+ msg.setParentRefId(value);
365
+ break;
366
+ default:
367
+ reader.skipField();
368
+ break;
369
+ }
370
+ }
371
+ return msg;
372
+ };
373
+
374
+
375
+ /**
376
+ * Serializes the message to binary data (in protobuf wire format).
377
+ * @return {!Uint8Array}
378
+ */
379
+ proto.Company.prototype.serializeBinary = function() {
380
+ var writer = new jspb.BinaryWriter();
381
+ proto.Company.serializeBinaryToWriter(this, writer);
382
+ return writer.getResultBuffer();
383
+ };
384
+
385
+
386
+ /**
387
+ * Serializes the given message to binary data (in protobuf wire
388
+ * format), writing to the given BinaryWriter.
389
+ * @param {!proto.Company} message
390
+ * @param {!jspb.BinaryWriter} writer
391
+ * @suppress {unusedLocalVariables} f is only used for nested messages
392
+ */
393
+ proto.Company.serializeBinaryToWriter = function(message, writer) {
394
+ var f = undefined;
395
+ f = message.getId();
396
+ if (f !== 0) {
397
+ writer.writeInt64(
398
+ 1,
399
+ f
400
+ );
401
+ }
402
+ f = message.getCode();
403
+ if (f.length > 0) {
404
+ writer.writeString(
405
+ 2,
406
+ f
407
+ );
408
+ }
409
+ f = message.getName();
410
+ if (f.length > 0) {
411
+ writer.writeString(
412
+ 3,
413
+ f
414
+ );
415
+ }
416
+ f = message.getCurrencyCode();
417
+ if (f.length > 0) {
418
+ writer.writeString(
419
+ 4,
420
+ f
421
+ );
422
+ }
423
+ f = message.getDescription();
424
+ if (f.length > 0) {
425
+ writer.writeString(
426
+ 5,
427
+ f
428
+ );
429
+ }
430
+ f = message.getParentRefId();
431
+ if (f.length > 0) {
432
+ writer.writeString(
433
+ 6,
434
+ f
435
+ );
436
+ }
437
+ };
438
+
439
+
440
+ /**
441
+ * optional int64 id = 1;
442
+ * @return {number}
443
+ */
444
+ proto.Company.prototype.getId = function() {
445
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
446
+ };
447
+
448
+
449
+ /**
450
+ * @param {number} value
451
+ * @return {!proto.Company} returns this
452
+ */
453
+ proto.Company.prototype.setId = function(value) {
454
+ return jspb.Message.setProto3IntField(this, 1, value);
455
+ };
456
+
457
+
458
+ /**
459
+ * optional string code = 2;
460
+ * @return {string}
461
+ */
462
+ proto.Company.prototype.getCode = function() {
463
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
464
+ };
465
+
466
+
467
+ /**
468
+ * @param {string} value
469
+ * @return {!proto.Company} returns this
470
+ */
471
+ proto.Company.prototype.setCode = function(value) {
472
+ return jspb.Message.setProto3StringField(this, 2, value);
473
+ };
474
+
475
+
476
+ /**
477
+ * optional string name = 3;
478
+ * @return {string}
479
+ */
480
+ proto.Company.prototype.getName = function() {
481
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
482
+ };
483
+
484
+
485
+ /**
486
+ * @param {string} value
487
+ * @return {!proto.Company} returns this
488
+ */
489
+ proto.Company.prototype.setName = function(value) {
490
+ return jspb.Message.setProto3StringField(this, 3, value);
491
+ };
492
+
493
+
494
+ /**
495
+ * optional string currency_code = 4;
496
+ * @return {string}
497
+ */
498
+ proto.Company.prototype.getCurrencyCode = function() {
499
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
500
+ };
501
+
502
+
503
+ /**
504
+ * @param {string} value
505
+ * @return {!proto.Company} returns this
506
+ */
507
+ proto.Company.prototype.setCurrencyCode = function(value) {
508
+ return jspb.Message.setProto3StringField(this, 4, value);
509
+ };
510
+
511
+
512
+ /**
513
+ * optional string description = 5;
514
+ * @return {string}
515
+ */
516
+ proto.Company.prototype.getDescription = function() {
517
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
518
+ };
519
+
520
+
521
+ /**
522
+ * @param {string} value
523
+ * @return {!proto.Company} returns this
524
+ */
525
+ proto.Company.prototype.setDescription = function(value) {
526
+ return jspb.Message.setProto3StringField(this, 5, value);
527
+ };
528
+
529
+
530
+ /**
531
+ * optional string parent_ref_id = 6;
532
+ * @return {string}
533
+ */
534
+ proto.Company.prototype.getParentRefId = function() {
535
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
536
+ };
537
+
538
+
539
+ /**
540
+ * @param {string} value
541
+ * @return {!proto.Company} returns this
542
+ */
543
+ proto.Company.prototype.setParentRefId = function(value) {
544
+ return jspb.Message.setProto3StringField(this, 6, value);
545
+ };
546
+
547
+
548
+
549
+
550
+
551
+ if (jspb.Message.GENERATE_TO_OBJECT) {
552
+ /**
553
+ * Creates an object representation of this proto.
554
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
555
+ * Optional fields that are not set will be set to undefined.
556
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
557
+ * For the list of reserved names please see:
558
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
559
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
560
+ * JSPB instance for transitional soy proto support:
561
+ * http://goto/soy-param-migration
562
+ * @return {!Object}
563
+ */
564
+ proto.CompanyGetByIdRequest.prototype.toObject = function(opt_includeInstance) {
565
+ return proto.CompanyGetByIdRequest.toObject(opt_includeInstance, this);
566
+ };
567
+
568
+
569
+ /**
570
+ * Static version of the {@see toObject} method.
571
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
572
+ * the JSPB instance for transitional soy proto support:
573
+ * http://goto/soy-param-migration
574
+ * @param {!proto.CompanyGetByIdRequest} msg The msg instance to transform.
575
+ * @return {!Object}
576
+ * @suppress {unusedLocalVariables} f is only used for nested messages
577
+ */
578
+ proto.CompanyGetByIdRequest.toObject = function(includeInstance, msg) {
579
+ var f, obj = {
580
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0)
581
+ };
582
+
583
+ if (includeInstance) {
584
+ obj.$jspbMessageInstance = msg;
585
+ }
586
+ return obj;
587
+ };
588
+ }
589
+
590
+
591
+ /**
592
+ * Deserializes binary data (in protobuf wire format).
593
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
594
+ * @return {!proto.CompanyGetByIdRequest}
595
+ */
596
+ proto.CompanyGetByIdRequest.deserializeBinary = function(bytes) {
597
+ var reader = new jspb.BinaryReader(bytes);
598
+ var msg = new proto.CompanyGetByIdRequest;
599
+ return proto.CompanyGetByIdRequest.deserializeBinaryFromReader(msg, reader);
600
+ };
601
+
602
+
603
+ /**
604
+ * Deserializes binary data (in protobuf wire format) from the
605
+ * given reader into the given message object.
606
+ * @param {!proto.CompanyGetByIdRequest} msg The message object to deserialize into.
607
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
608
+ * @return {!proto.CompanyGetByIdRequest}
609
+ */
610
+ proto.CompanyGetByIdRequest.deserializeBinaryFromReader = function(msg, reader) {
611
+ while (reader.nextField()) {
612
+ if (reader.isEndGroup()) {
613
+ break;
614
+ }
615
+ var field = reader.getFieldNumber();
616
+ switch (field) {
617
+ case 1:
618
+ var value = /** @type {number} */ (reader.readInt64());
619
+ msg.setId(value);
620
+ break;
621
+ default:
622
+ reader.skipField();
623
+ break;
624
+ }
625
+ }
626
+ return msg;
627
+ };
628
+
629
+
630
+ /**
631
+ * Serializes the message to binary data (in protobuf wire format).
632
+ * @return {!Uint8Array}
633
+ */
634
+ proto.CompanyGetByIdRequest.prototype.serializeBinary = function() {
635
+ var writer = new jspb.BinaryWriter();
636
+ proto.CompanyGetByIdRequest.serializeBinaryToWriter(this, writer);
637
+ return writer.getResultBuffer();
638
+ };
639
+
640
+
641
+ /**
642
+ * Serializes the given message to binary data (in protobuf wire
643
+ * format), writing to the given BinaryWriter.
644
+ * @param {!proto.CompanyGetByIdRequest} message
645
+ * @param {!jspb.BinaryWriter} writer
646
+ * @suppress {unusedLocalVariables} f is only used for nested messages
647
+ */
648
+ proto.CompanyGetByIdRequest.serializeBinaryToWriter = function(message, writer) {
649
+ var f = undefined;
650
+ f = message.getId();
651
+ if (f !== 0) {
652
+ writer.writeInt64(
653
+ 1,
654
+ f
655
+ );
656
+ }
657
+ };
658
+
659
+
660
+ /**
661
+ * optional int64 id = 1;
662
+ * @return {number}
663
+ */
664
+ proto.CompanyGetByIdRequest.prototype.getId = function() {
665
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
666
+ };
667
+
668
+
669
+ /**
670
+ * @param {number} value
671
+ * @return {!proto.CompanyGetByIdRequest} returns this
672
+ */
673
+ proto.CompanyGetByIdRequest.prototype.setId = function(value) {
674
+ return jspb.Message.setProto3IntField(this, 1, value);
675
+ };
676
+
677
+
678
+
679
+
680
+
681
+ if (jspb.Message.GENERATE_TO_OBJECT) {
682
+ /**
683
+ * Creates an object representation of this proto.
684
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
685
+ * Optional fields that are not set will be set to undefined.
686
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
687
+ * For the list of reserved names please see:
688
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
689
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
690
+ * JSPB instance for transitional soy proto support:
691
+ * http://goto/soy-param-migration
692
+ * @return {!Object}
693
+ */
694
+ proto.CompanyGetByIdResponse.prototype.toObject = function(opt_includeInstance) {
695
+ return proto.CompanyGetByIdResponse.toObject(opt_includeInstance, this);
696
+ };
697
+
698
+
699
+ /**
700
+ * Static version of the {@see toObject} method.
701
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
702
+ * the JSPB instance for transitional soy proto support:
703
+ * http://goto/soy-param-migration
704
+ * @param {!proto.CompanyGetByIdResponse} msg The msg instance to transform.
705
+ * @return {!Object}
706
+ * @suppress {unusedLocalVariables} f is only used for nested messages
707
+ */
708
+ proto.CompanyGetByIdResponse.toObject = function(includeInstance, msg) {
709
+ var f, obj = {
710
+ company: (f = msg.getCompany()) && proto.Company.toObject(includeInstance, f),
711
+ meta: (f = msg.getMeta()) && prisca_v1_global_meta_meta_pb.Meta.toObject(includeInstance, f)
712
+ };
713
+
714
+ if (includeInstance) {
715
+ obj.$jspbMessageInstance = msg;
716
+ }
717
+ return obj;
718
+ };
719
+ }
720
+
721
+
722
+ /**
723
+ * Deserializes binary data (in protobuf wire format).
724
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
725
+ * @return {!proto.CompanyGetByIdResponse}
726
+ */
727
+ proto.CompanyGetByIdResponse.deserializeBinary = function(bytes) {
728
+ var reader = new jspb.BinaryReader(bytes);
729
+ var msg = new proto.CompanyGetByIdResponse;
730
+ return proto.CompanyGetByIdResponse.deserializeBinaryFromReader(msg, reader);
731
+ };
732
+
733
+
734
+ /**
735
+ * Deserializes binary data (in protobuf wire format) from the
736
+ * given reader into the given message object.
737
+ * @param {!proto.CompanyGetByIdResponse} msg The message object to deserialize into.
738
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
739
+ * @return {!proto.CompanyGetByIdResponse}
740
+ */
741
+ proto.CompanyGetByIdResponse.deserializeBinaryFromReader = function(msg, reader) {
742
+ while (reader.nextField()) {
743
+ if (reader.isEndGroup()) {
744
+ break;
745
+ }
746
+ var field = reader.getFieldNumber();
747
+ switch (field) {
748
+ case 1:
749
+ var value = new proto.Company;
750
+ reader.readMessage(value,proto.Company.deserializeBinaryFromReader);
751
+ msg.setCompany(value);
752
+ break;
753
+ case 2:
754
+ var value = new prisca_v1_global_meta_meta_pb.Meta;
755
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.Meta.deserializeBinaryFromReader);
756
+ msg.setMeta(value);
757
+ break;
758
+ default:
759
+ reader.skipField();
760
+ break;
761
+ }
762
+ }
763
+ return msg;
764
+ };
765
+
766
+
767
+ /**
768
+ * Serializes the message to binary data (in protobuf wire format).
769
+ * @return {!Uint8Array}
770
+ */
771
+ proto.CompanyGetByIdResponse.prototype.serializeBinary = function() {
772
+ var writer = new jspb.BinaryWriter();
773
+ proto.CompanyGetByIdResponse.serializeBinaryToWriter(this, writer);
774
+ return writer.getResultBuffer();
775
+ };
776
+
777
+
778
+ /**
779
+ * Serializes the given message to binary data (in protobuf wire
780
+ * format), writing to the given BinaryWriter.
781
+ * @param {!proto.CompanyGetByIdResponse} message
782
+ * @param {!jspb.BinaryWriter} writer
783
+ * @suppress {unusedLocalVariables} f is only used for nested messages
784
+ */
785
+ proto.CompanyGetByIdResponse.serializeBinaryToWriter = function(message, writer) {
786
+ var f = undefined;
787
+ f = message.getCompany();
788
+ if (f != null) {
789
+ writer.writeMessage(
790
+ 1,
791
+ f,
792
+ proto.Company.serializeBinaryToWriter
793
+ );
794
+ }
795
+ f = message.getMeta();
796
+ if (f != null) {
797
+ writer.writeMessage(
798
+ 2,
799
+ f,
800
+ prisca_v1_global_meta_meta_pb.Meta.serializeBinaryToWriter
801
+ );
802
+ }
803
+ };
804
+
805
+
806
+ /**
807
+ * optional Company company = 1;
808
+ * @return {?proto.Company}
809
+ */
810
+ proto.CompanyGetByIdResponse.prototype.getCompany = function() {
811
+ return /** @type{?proto.Company} */ (
812
+ jspb.Message.getWrapperField(this, proto.Company, 1));
813
+ };
814
+
815
+
816
+ /**
817
+ * @param {?proto.Company|undefined} value
818
+ * @return {!proto.CompanyGetByIdResponse} returns this
819
+ */
820
+ proto.CompanyGetByIdResponse.prototype.setCompany = function(value) {
821
+ return jspb.Message.setWrapperField(this, 1, value);
822
+ };
823
+
824
+
825
+ /**
826
+ * Clears the message field making it undefined.
827
+ * @return {!proto.CompanyGetByIdResponse} returns this
828
+ */
829
+ proto.CompanyGetByIdResponse.prototype.clearCompany = function() {
830
+ return this.setCompany(undefined);
831
+ };
832
+
833
+
834
+ /**
835
+ * Returns whether this field is set.
836
+ * @return {boolean}
837
+ */
838
+ proto.CompanyGetByIdResponse.prototype.hasCompany = function() {
839
+ return jspb.Message.getField(this, 1) != null;
840
+ };
841
+
842
+
843
+ /**
844
+ * optional prisca.v1.global.meta.Meta meta = 2;
845
+ * @return {?proto.prisca.v1.global.meta.Meta}
846
+ */
847
+ proto.CompanyGetByIdResponse.prototype.getMeta = function() {
848
+ return /** @type{?proto.prisca.v1.global.meta.Meta} */ (
849
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.Meta, 2));
850
+ };
851
+
852
+
853
+ /**
854
+ * @param {?proto.prisca.v1.global.meta.Meta|undefined} value
855
+ * @return {!proto.CompanyGetByIdResponse} returns this
856
+ */
857
+ proto.CompanyGetByIdResponse.prototype.setMeta = function(value) {
858
+ return jspb.Message.setWrapperField(this, 2, value);
859
+ };
860
+
861
+
862
+ /**
863
+ * Clears the message field making it undefined.
864
+ * @return {!proto.CompanyGetByIdResponse} returns this
865
+ */
866
+ proto.CompanyGetByIdResponse.prototype.clearMeta = function() {
867
+ return this.setMeta(undefined);
868
+ };
869
+
870
+
871
+ /**
872
+ * Returns whether this field is set.
873
+ * @return {boolean}
874
+ */
875
+ proto.CompanyGetByIdResponse.prototype.hasMeta = function() {
876
+ return jspb.Message.getField(this, 2) != null;
877
+ };
878
+
879
+
880
+
881
+
882
+
883
+ if (jspb.Message.GENERATE_TO_OBJECT) {
884
+ /**
885
+ * Creates an object representation of this proto.
886
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
887
+ * Optional fields that are not set will be set to undefined.
888
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
889
+ * For the list of reserved names please see:
890
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
891
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
892
+ * JSPB instance for transitional soy proto support:
893
+ * http://goto/soy-param-migration
894
+ * @return {!Object}
895
+ */
896
+ proto.UpdateCompanyRequest.prototype.toObject = function(opt_includeInstance) {
897
+ return proto.UpdateCompanyRequest.toObject(opt_includeInstance, this);
898
+ };
899
+
900
+
901
+ /**
902
+ * Static version of the {@see toObject} method.
903
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
904
+ * the JSPB instance for transitional soy proto support:
905
+ * http://goto/soy-param-migration
906
+ * @param {!proto.UpdateCompanyRequest} msg The msg instance to transform.
907
+ * @return {!Object}
908
+ * @suppress {unusedLocalVariables} f is only used for nested messages
909
+ */
910
+ proto.UpdateCompanyRequest.toObject = function(includeInstance, msg) {
911
+ var f, obj = {
912
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
913
+ company: (f = msg.getCompany()) && proto.Company.toObject(includeInstance, f)
914
+ };
915
+
916
+ if (includeInstance) {
917
+ obj.$jspbMessageInstance = msg;
918
+ }
919
+ return obj;
920
+ };
921
+ }
922
+
923
+
924
+ /**
925
+ * Deserializes binary data (in protobuf wire format).
926
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
927
+ * @return {!proto.UpdateCompanyRequest}
928
+ */
929
+ proto.UpdateCompanyRequest.deserializeBinary = function(bytes) {
930
+ var reader = new jspb.BinaryReader(bytes);
931
+ var msg = new proto.UpdateCompanyRequest;
932
+ return proto.UpdateCompanyRequest.deserializeBinaryFromReader(msg, reader);
933
+ };
934
+
935
+
936
+ /**
937
+ * Deserializes binary data (in protobuf wire format) from the
938
+ * given reader into the given message object.
939
+ * @param {!proto.UpdateCompanyRequest} msg The message object to deserialize into.
940
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
941
+ * @return {!proto.UpdateCompanyRequest}
942
+ */
943
+ proto.UpdateCompanyRequest.deserializeBinaryFromReader = function(msg, reader) {
944
+ while (reader.nextField()) {
945
+ if (reader.isEndGroup()) {
946
+ break;
947
+ }
948
+ var field = reader.getFieldNumber();
949
+ switch (field) {
950
+ case 1:
951
+ var value = /** @type {number} */ (reader.readInt64());
952
+ msg.setId(value);
953
+ break;
954
+ case 2:
955
+ var value = new proto.Company;
956
+ reader.readMessage(value,proto.Company.deserializeBinaryFromReader);
957
+ msg.setCompany(value);
958
+ break;
959
+ default:
960
+ reader.skipField();
961
+ break;
962
+ }
963
+ }
964
+ return msg;
965
+ };
966
+
967
+
968
+ /**
969
+ * Serializes the message to binary data (in protobuf wire format).
970
+ * @return {!Uint8Array}
971
+ */
972
+ proto.UpdateCompanyRequest.prototype.serializeBinary = function() {
973
+ var writer = new jspb.BinaryWriter();
974
+ proto.UpdateCompanyRequest.serializeBinaryToWriter(this, writer);
975
+ return writer.getResultBuffer();
976
+ };
977
+
978
+
979
+ /**
980
+ * Serializes the given message to binary data (in protobuf wire
981
+ * format), writing to the given BinaryWriter.
982
+ * @param {!proto.UpdateCompanyRequest} message
983
+ * @param {!jspb.BinaryWriter} writer
984
+ * @suppress {unusedLocalVariables} f is only used for nested messages
985
+ */
986
+ proto.UpdateCompanyRequest.serializeBinaryToWriter = function(message, writer) {
987
+ var f = undefined;
988
+ f = message.getId();
989
+ if (f !== 0) {
990
+ writer.writeInt64(
991
+ 1,
992
+ f
993
+ );
994
+ }
995
+ f = message.getCompany();
996
+ if (f != null) {
997
+ writer.writeMessage(
998
+ 2,
999
+ f,
1000
+ proto.Company.serializeBinaryToWriter
1001
+ );
1002
+ }
1003
+ };
1004
+
1005
+
1006
+ /**
1007
+ * optional int64 id = 1;
1008
+ * @return {number}
1009
+ */
1010
+ proto.UpdateCompanyRequest.prototype.getId = function() {
1011
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1012
+ };
1013
+
1014
+
1015
+ /**
1016
+ * @param {number} value
1017
+ * @return {!proto.UpdateCompanyRequest} returns this
1018
+ */
1019
+ proto.UpdateCompanyRequest.prototype.setId = function(value) {
1020
+ return jspb.Message.setProto3IntField(this, 1, value);
1021
+ };
1022
+
1023
+
1024
+ /**
1025
+ * optional Company company = 2;
1026
+ * @return {?proto.Company}
1027
+ */
1028
+ proto.UpdateCompanyRequest.prototype.getCompany = function() {
1029
+ return /** @type{?proto.Company} */ (
1030
+ jspb.Message.getWrapperField(this, proto.Company, 2));
1031
+ };
1032
+
1033
+
1034
+ /**
1035
+ * @param {?proto.Company|undefined} value
1036
+ * @return {!proto.UpdateCompanyRequest} returns this
1037
+ */
1038
+ proto.UpdateCompanyRequest.prototype.setCompany = function(value) {
1039
+ return jspb.Message.setWrapperField(this, 2, value);
1040
+ };
1041
+
1042
+
1043
+ /**
1044
+ * Clears the message field making it undefined.
1045
+ * @return {!proto.UpdateCompanyRequest} returns this
1046
+ */
1047
+ proto.UpdateCompanyRequest.prototype.clearCompany = function() {
1048
+ return this.setCompany(undefined);
1049
+ };
1050
+
1051
+
1052
+ /**
1053
+ * Returns whether this field is set.
1054
+ * @return {boolean}
1055
+ */
1056
+ proto.UpdateCompanyRequest.prototype.hasCompany = function() {
1057
+ return jspb.Message.getField(this, 2) != null;
1058
+ };
1059
+
1060
+
1061
+
1062
+
1063
+
1064
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1065
+ /**
1066
+ * Creates an object representation of this proto.
1067
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1068
+ * Optional fields that are not set will be set to undefined.
1069
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1070
+ * For the list of reserved names please see:
1071
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1072
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1073
+ * JSPB instance for transitional soy proto support:
1074
+ * http://goto/soy-param-migration
1075
+ * @return {!Object}
1076
+ */
1077
+ proto.UpdateCompanyResponse.prototype.toObject = function(opt_includeInstance) {
1078
+ return proto.UpdateCompanyResponse.toObject(opt_includeInstance, this);
1079
+ };
1080
+
1081
+
1082
+ /**
1083
+ * Static version of the {@see toObject} method.
1084
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1085
+ * the JSPB instance for transitional soy proto support:
1086
+ * http://goto/soy-param-migration
1087
+ * @param {!proto.UpdateCompanyResponse} msg The msg instance to transform.
1088
+ * @return {!Object}
1089
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1090
+ */
1091
+ proto.UpdateCompanyResponse.toObject = function(includeInstance, msg) {
1092
+ var f, obj = {
1093
+ company: (f = msg.getCompany()) && proto.Company.toObject(includeInstance, f),
1094
+ meta: (f = msg.getMeta()) && prisca_v1_global_meta_meta_pb.Meta.toObject(includeInstance, f)
1095
+ };
1096
+
1097
+ if (includeInstance) {
1098
+ obj.$jspbMessageInstance = msg;
1099
+ }
1100
+ return obj;
1101
+ };
1102
+ }
1103
+
1104
+
1105
+ /**
1106
+ * Deserializes binary data (in protobuf wire format).
1107
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1108
+ * @return {!proto.UpdateCompanyResponse}
1109
+ */
1110
+ proto.UpdateCompanyResponse.deserializeBinary = function(bytes) {
1111
+ var reader = new jspb.BinaryReader(bytes);
1112
+ var msg = new proto.UpdateCompanyResponse;
1113
+ return proto.UpdateCompanyResponse.deserializeBinaryFromReader(msg, reader);
1114
+ };
1115
+
1116
+
1117
+ /**
1118
+ * Deserializes binary data (in protobuf wire format) from the
1119
+ * given reader into the given message object.
1120
+ * @param {!proto.UpdateCompanyResponse} msg The message object to deserialize into.
1121
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1122
+ * @return {!proto.UpdateCompanyResponse}
1123
+ */
1124
+ proto.UpdateCompanyResponse.deserializeBinaryFromReader = function(msg, reader) {
1125
+ while (reader.nextField()) {
1126
+ if (reader.isEndGroup()) {
1127
+ break;
1128
+ }
1129
+ var field = reader.getFieldNumber();
1130
+ switch (field) {
1131
+ case 1:
1132
+ var value = new proto.Company;
1133
+ reader.readMessage(value,proto.Company.deserializeBinaryFromReader);
1134
+ msg.setCompany(value);
1135
+ break;
1136
+ case 2:
1137
+ var value = new prisca_v1_global_meta_meta_pb.Meta;
1138
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.Meta.deserializeBinaryFromReader);
1139
+ msg.setMeta(value);
1140
+ break;
1141
+ default:
1142
+ reader.skipField();
1143
+ break;
1144
+ }
1145
+ }
1146
+ return msg;
1147
+ };
1148
+
1149
+
1150
+ /**
1151
+ * Serializes the message to binary data (in protobuf wire format).
1152
+ * @return {!Uint8Array}
1153
+ */
1154
+ proto.UpdateCompanyResponse.prototype.serializeBinary = function() {
1155
+ var writer = new jspb.BinaryWriter();
1156
+ proto.UpdateCompanyResponse.serializeBinaryToWriter(this, writer);
1157
+ return writer.getResultBuffer();
1158
+ };
1159
+
1160
+
1161
+ /**
1162
+ * Serializes the given message to binary data (in protobuf wire
1163
+ * format), writing to the given BinaryWriter.
1164
+ * @param {!proto.UpdateCompanyResponse} message
1165
+ * @param {!jspb.BinaryWriter} writer
1166
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1167
+ */
1168
+ proto.UpdateCompanyResponse.serializeBinaryToWriter = function(message, writer) {
1169
+ var f = undefined;
1170
+ f = message.getCompany();
1171
+ if (f != null) {
1172
+ writer.writeMessage(
1173
+ 1,
1174
+ f,
1175
+ proto.Company.serializeBinaryToWriter
1176
+ );
1177
+ }
1178
+ f = message.getMeta();
1179
+ if (f != null) {
1180
+ writer.writeMessage(
1181
+ 2,
1182
+ f,
1183
+ prisca_v1_global_meta_meta_pb.Meta.serializeBinaryToWriter
1184
+ );
1185
+ }
1186
+ };
1187
+
1188
+
1189
+ /**
1190
+ * optional Company company = 1;
1191
+ * @return {?proto.Company}
1192
+ */
1193
+ proto.UpdateCompanyResponse.prototype.getCompany = function() {
1194
+ return /** @type{?proto.Company} */ (
1195
+ jspb.Message.getWrapperField(this, proto.Company, 1));
1196
+ };
1197
+
1198
+
1199
+ /**
1200
+ * @param {?proto.Company|undefined} value
1201
+ * @return {!proto.UpdateCompanyResponse} returns this
1202
+ */
1203
+ proto.UpdateCompanyResponse.prototype.setCompany = function(value) {
1204
+ return jspb.Message.setWrapperField(this, 1, value);
1205
+ };
1206
+
1207
+
1208
+ /**
1209
+ * Clears the message field making it undefined.
1210
+ * @return {!proto.UpdateCompanyResponse} returns this
1211
+ */
1212
+ proto.UpdateCompanyResponse.prototype.clearCompany = function() {
1213
+ return this.setCompany(undefined);
1214
+ };
1215
+
1216
+
1217
+ /**
1218
+ * Returns whether this field is set.
1219
+ * @return {boolean}
1220
+ */
1221
+ proto.UpdateCompanyResponse.prototype.hasCompany = function() {
1222
+ return jspb.Message.getField(this, 1) != null;
1223
+ };
1224
+
1225
+
1226
+ /**
1227
+ * optional prisca.v1.global.meta.Meta meta = 2;
1228
+ * @return {?proto.prisca.v1.global.meta.Meta}
1229
+ */
1230
+ proto.UpdateCompanyResponse.prototype.getMeta = function() {
1231
+ return /** @type{?proto.prisca.v1.global.meta.Meta} */ (
1232
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.Meta, 2));
1233
+ };
1234
+
1235
+
1236
+ /**
1237
+ * @param {?proto.prisca.v1.global.meta.Meta|undefined} value
1238
+ * @return {!proto.UpdateCompanyResponse} returns this
1239
+ */
1240
+ proto.UpdateCompanyResponse.prototype.setMeta = function(value) {
1241
+ return jspb.Message.setWrapperField(this, 2, value);
1242
+ };
1243
+
1244
+
1245
+ /**
1246
+ * Clears the message field making it undefined.
1247
+ * @return {!proto.UpdateCompanyResponse} returns this
1248
+ */
1249
+ proto.UpdateCompanyResponse.prototype.clearMeta = function() {
1250
+ return this.setMeta(undefined);
1251
+ };
1252
+
1253
+
1254
+ /**
1255
+ * Returns whether this field is set.
1256
+ * @return {boolean}
1257
+ */
1258
+ proto.UpdateCompanyResponse.prototype.hasMeta = function() {
1259
+ return jspb.Message.getField(this, 2) != null;
1260
+ };
1261
+
1262
+
1263
+
1264
+
1265
+
1266
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1267
+ /**
1268
+ * Creates an object representation of this proto.
1269
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1270
+ * Optional fields that are not set will be set to undefined.
1271
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1272
+ * For the list of reserved names please see:
1273
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1274
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1275
+ * JSPB instance for transitional soy proto support:
1276
+ * http://goto/soy-param-migration
1277
+ * @return {!Object}
1278
+ */
1279
+ proto.CreateCompanyRequest.prototype.toObject = function(opt_includeInstance) {
1280
+ return proto.CreateCompanyRequest.toObject(opt_includeInstance, this);
1281
+ };
1282
+
1283
+
1284
+ /**
1285
+ * Static version of the {@see toObject} method.
1286
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1287
+ * the JSPB instance for transitional soy proto support:
1288
+ * http://goto/soy-param-migration
1289
+ * @param {!proto.CreateCompanyRequest} msg The msg instance to transform.
1290
+ * @return {!Object}
1291
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1292
+ */
1293
+ proto.CreateCompanyRequest.toObject = function(includeInstance, msg) {
1294
+ var f, obj = {
1295
+ company: (f = msg.getCompany()) && proto.Company.toObject(includeInstance, f)
1296
+ };
1297
+
1298
+ if (includeInstance) {
1299
+ obj.$jspbMessageInstance = msg;
1300
+ }
1301
+ return obj;
1302
+ };
1303
+ }
1304
+
1305
+
1306
+ /**
1307
+ * Deserializes binary data (in protobuf wire format).
1308
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1309
+ * @return {!proto.CreateCompanyRequest}
1310
+ */
1311
+ proto.CreateCompanyRequest.deserializeBinary = function(bytes) {
1312
+ var reader = new jspb.BinaryReader(bytes);
1313
+ var msg = new proto.CreateCompanyRequest;
1314
+ return proto.CreateCompanyRequest.deserializeBinaryFromReader(msg, reader);
1315
+ };
1316
+
1317
+
1318
+ /**
1319
+ * Deserializes binary data (in protobuf wire format) from the
1320
+ * given reader into the given message object.
1321
+ * @param {!proto.CreateCompanyRequest} msg The message object to deserialize into.
1322
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1323
+ * @return {!proto.CreateCompanyRequest}
1324
+ */
1325
+ proto.CreateCompanyRequest.deserializeBinaryFromReader = function(msg, reader) {
1326
+ while (reader.nextField()) {
1327
+ if (reader.isEndGroup()) {
1328
+ break;
1329
+ }
1330
+ var field = reader.getFieldNumber();
1331
+ switch (field) {
1332
+ case 1:
1333
+ var value = new proto.Company;
1334
+ reader.readMessage(value,proto.Company.deserializeBinaryFromReader);
1335
+ msg.setCompany(value);
1336
+ break;
1337
+ default:
1338
+ reader.skipField();
1339
+ break;
1340
+ }
1341
+ }
1342
+ return msg;
1343
+ };
1344
+
1345
+
1346
+ /**
1347
+ * Serializes the message to binary data (in protobuf wire format).
1348
+ * @return {!Uint8Array}
1349
+ */
1350
+ proto.CreateCompanyRequest.prototype.serializeBinary = function() {
1351
+ var writer = new jspb.BinaryWriter();
1352
+ proto.CreateCompanyRequest.serializeBinaryToWriter(this, writer);
1353
+ return writer.getResultBuffer();
1354
+ };
1355
+
1356
+
1357
+ /**
1358
+ * Serializes the given message to binary data (in protobuf wire
1359
+ * format), writing to the given BinaryWriter.
1360
+ * @param {!proto.CreateCompanyRequest} message
1361
+ * @param {!jspb.BinaryWriter} writer
1362
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1363
+ */
1364
+ proto.CreateCompanyRequest.serializeBinaryToWriter = function(message, writer) {
1365
+ var f = undefined;
1366
+ f = message.getCompany();
1367
+ if (f != null) {
1368
+ writer.writeMessage(
1369
+ 1,
1370
+ f,
1371
+ proto.Company.serializeBinaryToWriter
1372
+ );
1373
+ }
1374
+ };
1375
+
1376
+
1377
+ /**
1378
+ * optional Company company = 1;
1379
+ * @return {?proto.Company}
1380
+ */
1381
+ proto.CreateCompanyRequest.prototype.getCompany = function() {
1382
+ return /** @type{?proto.Company} */ (
1383
+ jspb.Message.getWrapperField(this, proto.Company, 1));
1384
+ };
1385
+
1386
+
1387
+ /**
1388
+ * @param {?proto.Company|undefined} value
1389
+ * @return {!proto.CreateCompanyRequest} returns this
1390
+ */
1391
+ proto.CreateCompanyRequest.prototype.setCompany = function(value) {
1392
+ return jspb.Message.setWrapperField(this, 1, value);
1393
+ };
1394
+
1395
+
1396
+ /**
1397
+ * Clears the message field making it undefined.
1398
+ * @return {!proto.CreateCompanyRequest} returns this
1399
+ */
1400
+ proto.CreateCompanyRequest.prototype.clearCompany = function() {
1401
+ return this.setCompany(undefined);
1402
+ };
1403
+
1404
+
1405
+ /**
1406
+ * Returns whether this field is set.
1407
+ * @return {boolean}
1408
+ */
1409
+ proto.CreateCompanyRequest.prototype.hasCompany = function() {
1410
+ return jspb.Message.getField(this, 1) != null;
1411
+ };
1412
+
1413
+
1414
+
1415
+
1416
+
1417
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1418
+ /**
1419
+ * Creates an object representation of this proto.
1420
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1421
+ * Optional fields that are not set will be set to undefined.
1422
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1423
+ * For the list of reserved names please see:
1424
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1425
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1426
+ * JSPB instance for transitional soy proto support:
1427
+ * http://goto/soy-param-migration
1428
+ * @return {!Object}
1429
+ */
1430
+ proto.CreateCompanyResponse.prototype.toObject = function(opt_includeInstance) {
1431
+ return proto.CreateCompanyResponse.toObject(opt_includeInstance, this);
1432
+ };
1433
+
1434
+
1435
+ /**
1436
+ * Static version of the {@see toObject} method.
1437
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1438
+ * the JSPB instance for transitional soy proto support:
1439
+ * http://goto/soy-param-migration
1440
+ * @param {!proto.CreateCompanyResponse} msg The msg instance to transform.
1441
+ * @return {!Object}
1442
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1443
+ */
1444
+ proto.CreateCompanyResponse.toObject = function(includeInstance, msg) {
1445
+ var f, obj = {
1446
+ company: (f = msg.getCompany()) && proto.Company.toObject(includeInstance, f),
1447
+ meta: (f = msg.getMeta()) && prisca_v1_global_meta_meta_pb.Meta.toObject(includeInstance, f)
1448
+ };
1449
+
1450
+ if (includeInstance) {
1451
+ obj.$jspbMessageInstance = msg;
1452
+ }
1453
+ return obj;
1454
+ };
1455
+ }
1456
+
1457
+
1458
+ /**
1459
+ * Deserializes binary data (in protobuf wire format).
1460
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1461
+ * @return {!proto.CreateCompanyResponse}
1462
+ */
1463
+ proto.CreateCompanyResponse.deserializeBinary = function(bytes) {
1464
+ var reader = new jspb.BinaryReader(bytes);
1465
+ var msg = new proto.CreateCompanyResponse;
1466
+ return proto.CreateCompanyResponse.deserializeBinaryFromReader(msg, reader);
1467
+ };
1468
+
1469
+
1470
+ /**
1471
+ * Deserializes binary data (in protobuf wire format) from the
1472
+ * given reader into the given message object.
1473
+ * @param {!proto.CreateCompanyResponse} msg The message object to deserialize into.
1474
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1475
+ * @return {!proto.CreateCompanyResponse}
1476
+ */
1477
+ proto.CreateCompanyResponse.deserializeBinaryFromReader = function(msg, reader) {
1478
+ while (reader.nextField()) {
1479
+ if (reader.isEndGroup()) {
1480
+ break;
1481
+ }
1482
+ var field = reader.getFieldNumber();
1483
+ switch (field) {
1484
+ case 1:
1485
+ var value = new proto.Company;
1486
+ reader.readMessage(value,proto.Company.deserializeBinaryFromReader);
1487
+ msg.setCompany(value);
1488
+ break;
1489
+ case 2:
1490
+ var value = new prisca_v1_global_meta_meta_pb.Meta;
1491
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.Meta.deserializeBinaryFromReader);
1492
+ msg.setMeta(value);
1493
+ break;
1494
+ default:
1495
+ reader.skipField();
1496
+ break;
1497
+ }
1498
+ }
1499
+ return msg;
1500
+ };
1501
+
1502
+
1503
+ /**
1504
+ * Serializes the message to binary data (in protobuf wire format).
1505
+ * @return {!Uint8Array}
1506
+ */
1507
+ proto.CreateCompanyResponse.prototype.serializeBinary = function() {
1508
+ var writer = new jspb.BinaryWriter();
1509
+ proto.CreateCompanyResponse.serializeBinaryToWriter(this, writer);
1510
+ return writer.getResultBuffer();
1511
+ };
1512
+
1513
+
1514
+ /**
1515
+ * Serializes the given message to binary data (in protobuf wire
1516
+ * format), writing to the given BinaryWriter.
1517
+ * @param {!proto.CreateCompanyResponse} message
1518
+ * @param {!jspb.BinaryWriter} writer
1519
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1520
+ */
1521
+ proto.CreateCompanyResponse.serializeBinaryToWriter = function(message, writer) {
1522
+ var f = undefined;
1523
+ f = message.getCompany();
1524
+ if (f != null) {
1525
+ writer.writeMessage(
1526
+ 1,
1527
+ f,
1528
+ proto.Company.serializeBinaryToWriter
1529
+ );
1530
+ }
1531
+ f = message.getMeta();
1532
+ if (f != null) {
1533
+ writer.writeMessage(
1534
+ 2,
1535
+ f,
1536
+ prisca_v1_global_meta_meta_pb.Meta.serializeBinaryToWriter
1537
+ );
1538
+ }
1539
+ };
1540
+
1541
+
1542
+ /**
1543
+ * optional Company company = 1;
1544
+ * @return {?proto.Company}
1545
+ */
1546
+ proto.CreateCompanyResponse.prototype.getCompany = function() {
1547
+ return /** @type{?proto.Company} */ (
1548
+ jspb.Message.getWrapperField(this, proto.Company, 1));
1549
+ };
1550
+
1551
+
1552
+ /**
1553
+ * @param {?proto.Company|undefined} value
1554
+ * @return {!proto.CreateCompanyResponse} returns this
1555
+ */
1556
+ proto.CreateCompanyResponse.prototype.setCompany = function(value) {
1557
+ return jspb.Message.setWrapperField(this, 1, value);
1558
+ };
1559
+
1560
+
1561
+ /**
1562
+ * Clears the message field making it undefined.
1563
+ * @return {!proto.CreateCompanyResponse} returns this
1564
+ */
1565
+ proto.CreateCompanyResponse.prototype.clearCompany = function() {
1566
+ return this.setCompany(undefined);
1567
+ };
1568
+
1569
+
1570
+ /**
1571
+ * Returns whether this field is set.
1572
+ * @return {boolean}
1573
+ */
1574
+ proto.CreateCompanyResponse.prototype.hasCompany = function() {
1575
+ return jspb.Message.getField(this, 1) != null;
1576
+ };
1577
+
1578
+
1579
+ /**
1580
+ * optional prisca.v1.global.meta.Meta meta = 2;
1581
+ * @return {?proto.prisca.v1.global.meta.Meta}
1582
+ */
1583
+ proto.CreateCompanyResponse.prototype.getMeta = function() {
1584
+ return /** @type{?proto.prisca.v1.global.meta.Meta} */ (
1585
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.Meta, 2));
1586
+ };
1587
+
1588
+
1589
+ /**
1590
+ * @param {?proto.prisca.v1.global.meta.Meta|undefined} value
1591
+ * @return {!proto.CreateCompanyResponse} returns this
1592
+ */
1593
+ proto.CreateCompanyResponse.prototype.setMeta = function(value) {
1594
+ return jspb.Message.setWrapperField(this, 2, value);
1595
+ };
1596
+
1597
+
1598
+ /**
1599
+ * Clears the message field making it undefined.
1600
+ * @return {!proto.CreateCompanyResponse} returns this
1601
+ */
1602
+ proto.CreateCompanyResponse.prototype.clearMeta = function() {
1603
+ return this.setMeta(undefined);
1604
+ };
1605
+
1606
+
1607
+ /**
1608
+ * Returns whether this field is set.
1609
+ * @return {boolean}
1610
+ */
1611
+ proto.CreateCompanyResponse.prototype.hasMeta = function() {
1612
+ return jspb.Message.getField(this, 2) != null;
1613
+ };
1614
+
1615
+
1616
+
1617
+
1618
+
1619
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1620
+ /**
1621
+ * Creates an object representation of this proto.
1622
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1623
+ * Optional fields that are not set will be set to undefined.
1624
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1625
+ * For the list of reserved names please see:
1626
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1627
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1628
+ * JSPB instance for transitional soy proto support:
1629
+ * http://goto/soy-param-migration
1630
+ * @return {!Object}
1631
+ */
1632
+ proto.DeleteCompanyRequest.prototype.toObject = function(opt_includeInstance) {
1633
+ return proto.DeleteCompanyRequest.toObject(opt_includeInstance, this);
1634
+ };
1635
+
1636
+
1637
+ /**
1638
+ * Static version of the {@see toObject} method.
1639
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1640
+ * the JSPB instance for transitional soy proto support:
1641
+ * http://goto/soy-param-migration
1642
+ * @param {!proto.DeleteCompanyRequest} msg The msg instance to transform.
1643
+ * @return {!Object}
1644
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1645
+ */
1646
+ proto.DeleteCompanyRequest.toObject = function(includeInstance, msg) {
1647
+ var f, obj = {
1648
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0)
1649
+ };
1650
+
1651
+ if (includeInstance) {
1652
+ obj.$jspbMessageInstance = msg;
1653
+ }
1654
+ return obj;
1655
+ };
1656
+ }
1657
+
1658
+
1659
+ /**
1660
+ * Deserializes binary data (in protobuf wire format).
1661
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1662
+ * @return {!proto.DeleteCompanyRequest}
1663
+ */
1664
+ proto.DeleteCompanyRequest.deserializeBinary = function(bytes) {
1665
+ var reader = new jspb.BinaryReader(bytes);
1666
+ var msg = new proto.DeleteCompanyRequest;
1667
+ return proto.DeleteCompanyRequest.deserializeBinaryFromReader(msg, reader);
1668
+ };
1669
+
1670
+
1671
+ /**
1672
+ * Deserializes binary data (in protobuf wire format) from the
1673
+ * given reader into the given message object.
1674
+ * @param {!proto.DeleteCompanyRequest} msg The message object to deserialize into.
1675
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1676
+ * @return {!proto.DeleteCompanyRequest}
1677
+ */
1678
+ proto.DeleteCompanyRequest.deserializeBinaryFromReader = function(msg, reader) {
1679
+ while (reader.nextField()) {
1680
+ if (reader.isEndGroup()) {
1681
+ break;
1682
+ }
1683
+ var field = reader.getFieldNumber();
1684
+ switch (field) {
1685
+ case 1:
1686
+ var value = /** @type {number} */ (reader.readInt64());
1687
+ msg.setId(value);
1688
+ break;
1689
+ default:
1690
+ reader.skipField();
1691
+ break;
1692
+ }
1693
+ }
1694
+ return msg;
1695
+ };
1696
+
1697
+
1698
+ /**
1699
+ * Serializes the message to binary data (in protobuf wire format).
1700
+ * @return {!Uint8Array}
1701
+ */
1702
+ proto.DeleteCompanyRequest.prototype.serializeBinary = function() {
1703
+ var writer = new jspb.BinaryWriter();
1704
+ proto.DeleteCompanyRequest.serializeBinaryToWriter(this, writer);
1705
+ return writer.getResultBuffer();
1706
+ };
1707
+
1708
+
1709
+ /**
1710
+ * Serializes the given message to binary data (in protobuf wire
1711
+ * format), writing to the given BinaryWriter.
1712
+ * @param {!proto.DeleteCompanyRequest} message
1713
+ * @param {!jspb.BinaryWriter} writer
1714
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1715
+ */
1716
+ proto.DeleteCompanyRequest.serializeBinaryToWriter = function(message, writer) {
1717
+ var f = undefined;
1718
+ f = message.getId();
1719
+ if (f !== 0) {
1720
+ writer.writeInt64(
1721
+ 1,
1722
+ f
1723
+ );
1724
+ }
1725
+ };
1726
+
1727
+
1728
+ /**
1729
+ * optional int64 id = 1;
1730
+ * @return {number}
1731
+ */
1732
+ proto.DeleteCompanyRequest.prototype.getId = function() {
1733
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1734
+ };
1735
+
1736
+
1737
+ /**
1738
+ * @param {number} value
1739
+ * @return {!proto.DeleteCompanyRequest} returns this
1740
+ */
1741
+ proto.DeleteCompanyRequest.prototype.setId = function(value) {
1742
+ return jspb.Message.setProto3IntField(this, 1, value);
1743
+ };
1744
+
1745
+
1746
+
1747
+
1748
+
1749
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1750
+ /**
1751
+ * Creates an object representation of this proto.
1752
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1753
+ * Optional fields that are not set will be set to undefined.
1754
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1755
+ * For the list of reserved names please see:
1756
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1757
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1758
+ * JSPB instance for transitional soy proto support:
1759
+ * http://goto/soy-param-migration
1760
+ * @return {!Object}
1761
+ */
1762
+ proto.DeleteCompanyResponse.prototype.toObject = function(opt_includeInstance) {
1763
+ return proto.DeleteCompanyResponse.toObject(opt_includeInstance, this);
1764
+ };
1765
+
1766
+
1767
+ /**
1768
+ * Static version of the {@see toObject} method.
1769
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1770
+ * the JSPB instance for transitional soy proto support:
1771
+ * http://goto/soy-param-migration
1772
+ * @param {!proto.DeleteCompanyResponse} msg The msg instance to transform.
1773
+ * @return {!Object}
1774
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1775
+ */
1776
+ proto.DeleteCompanyResponse.toObject = function(includeInstance, msg) {
1777
+ var f, obj = {
1778
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
1779
+ meta: (f = msg.getMeta()) && prisca_v1_global_meta_meta_pb.Meta.toObject(includeInstance, f)
1780
+ };
1781
+
1782
+ if (includeInstance) {
1783
+ obj.$jspbMessageInstance = msg;
1784
+ }
1785
+ return obj;
1786
+ };
1787
+ }
1788
+
1789
+
1790
+ /**
1791
+ * Deserializes binary data (in protobuf wire format).
1792
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1793
+ * @return {!proto.DeleteCompanyResponse}
1794
+ */
1795
+ proto.DeleteCompanyResponse.deserializeBinary = function(bytes) {
1796
+ var reader = new jspb.BinaryReader(bytes);
1797
+ var msg = new proto.DeleteCompanyResponse;
1798
+ return proto.DeleteCompanyResponse.deserializeBinaryFromReader(msg, reader);
1799
+ };
1800
+
1801
+
1802
+ /**
1803
+ * Deserializes binary data (in protobuf wire format) from the
1804
+ * given reader into the given message object.
1805
+ * @param {!proto.DeleteCompanyResponse} msg The message object to deserialize into.
1806
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1807
+ * @return {!proto.DeleteCompanyResponse}
1808
+ */
1809
+ proto.DeleteCompanyResponse.deserializeBinaryFromReader = function(msg, reader) {
1810
+ while (reader.nextField()) {
1811
+ if (reader.isEndGroup()) {
1812
+ break;
1813
+ }
1814
+ var field = reader.getFieldNumber();
1815
+ switch (field) {
1816
+ case 1:
1817
+ var value = /** @type {number} */ (reader.readInt64());
1818
+ msg.setId(value);
1819
+ break;
1820
+ case 2:
1821
+ var value = new prisca_v1_global_meta_meta_pb.Meta;
1822
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.Meta.deserializeBinaryFromReader);
1823
+ msg.setMeta(value);
1824
+ break;
1825
+ default:
1826
+ reader.skipField();
1827
+ break;
1828
+ }
1829
+ }
1830
+ return msg;
1831
+ };
1832
+
1833
+
1834
+ /**
1835
+ * Serializes the message to binary data (in protobuf wire format).
1836
+ * @return {!Uint8Array}
1837
+ */
1838
+ proto.DeleteCompanyResponse.prototype.serializeBinary = function() {
1839
+ var writer = new jspb.BinaryWriter();
1840
+ proto.DeleteCompanyResponse.serializeBinaryToWriter(this, writer);
1841
+ return writer.getResultBuffer();
1842
+ };
1843
+
1844
+
1845
+ /**
1846
+ * Serializes the given message to binary data (in protobuf wire
1847
+ * format), writing to the given BinaryWriter.
1848
+ * @param {!proto.DeleteCompanyResponse} message
1849
+ * @param {!jspb.BinaryWriter} writer
1850
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1851
+ */
1852
+ proto.DeleteCompanyResponse.serializeBinaryToWriter = function(message, writer) {
1853
+ var f = undefined;
1854
+ f = message.getId();
1855
+ if (f !== 0) {
1856
+ writer.writeInt64(
1857
+ 1,
1858
+ f
1859
+ );
1860
+ }
1861
+ f = message.getMeta();
1862
+ if (f != null) {
1863
+ writer.writeMessage(
1864
+ 2,
1865
+ f,
1866
+ prisca_v1_global_meta_meta_pb.Meta.serializeBinaryToWriter
1867
+ );
1868
+ }
1869
+ };
1870
+
1871
+
1872
+ /**
1873
+ * optional int64 id = 1;
1874
+ * @return {number}
1875
+ */
1876
+ proto.DeleteCompanyResponse.prototype.getId = function() {
1877
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1878
+ };
1879
+
1880
+
1881
+ /**
1882
+ * @param {number} value
1883
+ * @return {!proto.DeleteCompanyResponse} returns this
1884
+ */
1885
+ proto.DeleteCompanyResponse.prototype.setId = function(value) {
1886
+ return jspb.Message.setProto3IntField(this, 1, value);
1887
+ };
1888
+
1889
+
1890
+ /**
1891
+ * optional prisca.v1.global.meta.Meta meta = 2;
1892
+ * @return {?proto.prisca.v1.global.meta.Meta}
1893
+ */
1894
+ proto.DeleteCompanyResponse.prototype.getMeta = function() {
1895
+ return /** @type{?proto.prisca.v1.global.meta.Meta} */ (
1896
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.Meta, 2));
1897
+ };
1898
+
1899
+
1900
+ /**
1901
+ * @param {?proto.prisca.v1.global.meta.Meta|undefined} value
1902
+ * @return {!proto.DeleteCompanyResponse} returns this
1903
+ */
1904
+ proto.DeleteCompanyResponse.prototype.setMeta = function(value) {
1905
+ return jspb.Message.setWrapperField(this, 2, value);
1906
+ };
1907
+
1908
+
1909
+ /**
1910
+ * Clears the message field making it undefined.
1911
+ * @return {!proto.DeleteCompanyResponse} returns this
1912
+ */
1913
+ proto.DeleteCompanyResponse.prototype.clearMeta = function() {
1914
+ return this.setMeta(undefined);
1915
+ };
1916
+
1917
+
1918
+ /**
1919
+ * Returns whether this field is set.
1920
+ * @return {boolean}
1921
+ */
1922
+ proto.DeleteCompanyResponse.prototype.hasMeta = function() {
1923
+ return jspb.Message.getField(this, 2) != null;
1924
+ };
1925
+
1926
+
1927
+
1928
+
1929
+
1930
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1931
+ /**
1932
+ * Creates an object representation of this proto.
1933
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1934
+ * Optional fields that are not set will be set to undefined.
1935
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1936
+ * For the list of reserved names please see:
1937
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1938
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1939
+ * JSPB instance for transitional soy proto support:
1940
+ * http://goto/soy-param-migration
1941
+ * @return {!Object}
1942
+ */
1943
+ proto.GetListCompanyRequest.prototype.toObject = function(opt_includeInstance) {
1944
+ return proto.GetListCompanyRequest.toObject(opt_includeInstance, this);
1945
+ };
1946
+
1947
+
1948
+ /**
1949
+ * Static version of the {@see toObject} method.
1950
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1951
+ * the JSPB instance for transitional soy proto support:
1952
+ * http://goto/soy-param-migration
1953
+ * @param {!proto.GetListCompanyRequest} msg The msg instance to transform.
1954
+ * @return {!Object}
1955
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1956
+ */
1957
+ proto.GetListCompanyRequest.toObject = function(includeInstance, msg) {
1958
+ var f, obj = {
1959
+ pagination: (f = msg.getPagination()) && prisca_v1_global_meta_meta_pb.PaginationRequest.toObject(includeInstance, f),
1960
+ query: (f = msg.getQuery()) && prisca_v1_global_meta_meta_pb.FilterRequest.toObject(includeInstance, f)
1961
+ };
1962
+
1963
+ if (includeInstance) {
1964
+ obj.$jspbMessageInstance = msg;
1965
+ }
1966
+ return obj;
1967
+ };
1968
+ }
1969
+
1970
+
1971
+ /**
1972
+ * Deserializes binary data (in protobuf wire format).
1973
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1974
+ * @return {!proto.GetListCompanyRequest}
1975
+ */
1976
+ proto.GetListCompanyRequest.deserializeBinary = function(bytes) {
1977
+ var reader = new jspb.BinaryReader(bytes);
1978
+ var msg = new proto.GetListCompanyRequest;
1979
+ return proto.GetListCompanyRequest.deserializeBinaryFromReader(msg, reader);
1980
+ };
1981
+
1982
+
1983
+ /**
1984
+ * Deserializes binary data (in protobuf wire format) from the
1985
+ * given reader into the given message object.
1986
+ * @param {!proto.GetListCompanyRequest} msg The message object to deserialize into.
1987
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1988
+ * @return {!proto.GetListCompanyRequest}
1989
+ */
1990
+ proto.GetListCompanyRequest.deserializeBinaryFromReader = function(msg, reader) {
1991
+ while (reader.nextField()) {
1992
+ if (reader.isEndGroup()) {
1993
+ break;
1994
+ }
1995
+ var field = reader.getFieldNumber();
1996
+ switch (field) {
1997
+ case 1:
1998
+ var value = new prisca_v1_global_meta_meta_pb.PaginationRequest;
1999
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.PaginationRequest.deserializeBinaryFromReader);
2000
+ msg.setPagination(value);
2001
+ break;
2002
+ case 2:
2003
+ var value = new prisca_v1_global_meta_meta_pb.FilterRequest;
2004
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.FilterRequest.deserializeBinaryFromReader);
2005
+ msg.setQuery(value);
2006
+ break;
2007
+ default:
2008
+ reader.skipField();
2009
+ break;
2010
+ }
2011
+ }
2012
+ return msg;
2013
+ };
2014
+
2015
+
2016
+ /**
2017
+ * Serializes the message to binary data (in protobuf wire format).
2018
+ * @return {!Uint8Array}
2019
+ */
2020
+ proto.GetListCompanyRequest.prototype.serializeBinary = function() {
2021
+ var writer = new jspb.BinaryWriter();
2022
+ proto.GetListCompanyRequest.serializeBinaryToWriter(this, writer);
2023
+ return writer.getResultBuffer();
2024
+ };
2025
+
2026
+
2027
+ /**
2028
+ * Serializes the given message to binary data (in protobuf wire
2029
+ * format), writing to the given BinaryWriter.
2030
+ * @param {!proto.GetListCompanyRequest} message
2031
+ * @param {!jspb.BinaryWriter} writer
2032
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2033
+ */
2034
+ proto.GetListCompanyRequest.serializeBinaryToWriter = function(message, writer) {
2035
+ var f = undefined;
2036
+ f = message.getPagination();
2037
+ if (f != null) {
2038
+ writer.writeMessage(
2039
+ 1,
2040
+ f,
2041
+ prisca_v1_global_meta_meta_pb.PaginationRequest.serializeBinaryToWriter
2042
+ );
2043
+ }
2044
+ f = message.getQuery();
2045
+ if (f != null) {
2046
+ writer.writeMessage(
2047
+ 2,
2048
+ f,
2049
+ prisca_v1_global_meta_meta_pb.FilterRequest.serializeBinaryToWriter
2050
+ );
2051
+ }
2052
+ };
2053
+
2054
+
2055
+ /**
2056
+ * optional prisca.v1.global.meta.PaginationRequest pagination = 1;
2057
+ * @return {?proto.prisca.v1.global.meta.PaginationRequest}
2058
+ */
2059
+ proto.GetListCompanyRequest.prototype.getPagination = function() {
2060
+ return /** @type{?proto.prisca.v1.global.meta.PaginationRequest} */ (
2061
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.PaginationRequest, 1));
2062
+ };
2063
+
2064
+
2065
+ /**
2066
+ * @param {?proto.prisca.v1.global.meta.PaginationRequest|undefined} value
2067
+ * @return {!proto.GetListCompanyRequest} returns this
2068
+ */
2069
+ proto.GetListCompanyRequest.prototype.setPagination = function(value) {
2070
+ return jspb.Message.setWrapperField(this, 1, value);
2071
+ };
2072
+
2073
+
2074
+ /**
2075
+ * Clears the message field making it undefined.
2076
+ * @return {!proto.GetListCompanyRequest} returns this
2077
+ */
2078
+ proto.GetListCompanyRequest.prototype.clearPagination = function() {
2079
+ return this.setPagination(undefined);
2080
+ };
2081
+
2082
+
2083
+ /**
2084
+ * Returns whether this field is set.
2085
+ * @return {boolean}
2086
+ */
2087
+ proto.GetListCompanyRequest.prototype.hasPagination = function() {
2088
+ return jspb.Message.getField(this, 1) != null;
2089
+ };
2090
+
2091
+
2092
+ /**
2093
+ * optional prisca.v1.global.meta.FilterRequest query = 2;
2094
+ * @return {?proto.prisca.v1.global.meta.FilterRequest}
2095
+ */
2096
+ proto.GetListCompanyRequest.prototype.getQuery = function() {
2097
+ return /** @type{?proto.prisca.v1.global.meta.FilterRequest} */ (
2098
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.FilterRequest, 2));
2099
+ };
2100
+
2101
+
2102
+ /**
2103
+ * @param {?proto.prisca.v1.global.meta.FilterRequest|undefined} value
2104
+ * @return {!proto.GetListCompanyRequest} returns this
2105
+ */
2106
+ proto.GetListCompanyRequest.prototype.setQuery = function(value) {
2107
+ return jspb.Message.setWrapperField(this, 2, value);
2108
+ };
2109
+
2110
+
2111
+ /**
2112
+ * Clears the message field making it undefined.
2113
+ * @return {!proto.GetListCompanyRequest} returns this
2114
+ */
2115
+ proto.GetListCompanyRequest.prototype.clearQuery = function() {
2116
+ return this.setQuery(undefined);
2117
+ };
2118
+
2119
+
2120
+ /**
2121
+ * Returns whether this field is set.
2122
+ * @return {boolean}
2123
+ */
2124
+ proto.GetListCompanyRequest.prototype.hasQuery = function() {
2125
+ return jspb.Message.getField(this, 2) != null;
2126
+ };
2127
+
2128
+
2129
+
2130
+ /**
2131
+ * List of repeated fields within this message type.
2132
+ * @private {!Array<number>}
2133
+ * @const
2134
+ */
2135
+ proto.GetListCompanyResponse.repeatedFields_ = [1];
2136
+
2137
+
2138
+
2139
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2140
+ /**
2141
+ * Creates an object representation of this proto.
2142
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2143
+ * Optional fields that are not set will be set to undefined.
2144
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2145
+ * For the list of reserved names please see:
2146
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2147
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2148
+ * JSPB instance for transitional soy proto support:
2149
+ * http://goto/soy-param-migration
2150
+ * @return {!Object}
2151
+ */
2152
+ proto.GetListCompanyResponse.prototype.toObject = function(opt_includeInstance) {
2153
+ return proto.GetListCompanyResponse.toObject(opt_includeInstance, this);
2154
+ };
2155
+
2156
+
2157
+ /**
2158
+ * Static version of the {@see toObject} method.
2159
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2160
+ * the JSPB instance for transitional soy proto support:
2161
+ * http://goto/soy-param-migration
2162
+ * @param {!proto.GetListCompanyResponse} msg The msg instance to transform.
2163
+ * @return {!Object}
2164
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2165
+ */
2166
+ proto.GetListCompanyResponse.toObject = function(includeInstance, msg) {
2167
+ var f, obj = {
2168
+ companyList: jspb.Message.toObjectList(msg.getCompanyList(),
2169
+ proto.Company.toObject, includeInstance),
2170
+ meta: (f = msg.getMeta()) && prisca_v1_global_meta_meta_pb.Meta.toObject(includeInstance, f)
2171
+ };
2172
+
2173
+ if (includeInstance) {
2174
+ obj.$jspbMessageInstance = msg;
2175
+ }
2176
+ return obj;
2177
+ };
2178
+ }
2179
+
2180
+
2181
+ /**
2182
+ * Deserializes binary data (in protobuf wire format).
2183
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2184
+ * @return {!proto.GetListCompanyResponse}
2185
+ */
2186
+ proto.GetListCompanyResponse.deserializeBinary = function(bytes) {
2187
+ var reader = new jspb.BinaryReader(bytes);
2188
+ var msg = new proto.GetListCompanyResponse;
2189
+ return proto.GetListCompanyResponse.deserializeBinaryFromReader(msg, reader);
2190
+ };
2191
+
2192
+
2193
+ /**
2194
+ * Deserializes binary data (in protobuf wire format) from the
2195
+ * given reader into the given message object.
2196
+ * @param {!proto.GetListCompanyResponse} msg The message object to deserialize into.
2197
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2198
+ * @return {!proto.GetListCompanyResponse}
2199
+ */
2200
+ proto.GetListCompanyResponse.deserializeBinaryFromReader = function(msg, reader) {
2201
+ while (reader.nextField()) {
2202
+ if (reader.isEndGroup()) {
2203
+ break;
2204
+ }
2205
+ var field = reader.getFieldNumber();
2206
+ switch (field) {
2207
+ case 1:
2208
+ var value = new proto.Company;
2209
+ reader.readMessage(value,proto.Company.deserializeBinaryFromReader);
2210
+ msg.addCompany(value);
2211
+ break;
2212
+ case 2:
2213
+ var value = new prisca_v1_global_meta_meta_pb.Meta;
2214
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.Meta.deserializeBinaryFromReader);
2215
+ msg.setMeta(value);
2216
+ break;
2217
+ default:
2218
+ reader.skipField();
2219
+ break;
2220
+ }
2221
+ }
2222
+ return msg;
2223
+ };
2224
+
2225
+
2226
+ /**
2227
+ * Serializes the message to binary data (in protobuf wire format).
2228
+ * @return {!Uint8Array}
2229
+ */
2230
+ proto.GetListCompanyResponse.prototype.serializeBinary = function() {
2231
+ var writer = new jspb.BinaryWriter();
2232
+ proto.GetListCompanyResponse.serializeBinaryToWriter(this, writer);
2233
+ return writer.getResultBuffer();
2234
+ };
2235
+
2236
+
2237
+ /**
2238
+ * Serializes the given message to binary data (in protobuf wire
2239
+ * format), writing to the given BinaryWriter.
2240
+ * @param {!proto.GetListCompanyResponse} message
2241
+ * @param {!jspb.BinaryWriter} writer
2242
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2243
+ */
2244
+ proto.GetListCompanyResponse.serializeBinaryToWriter = function(message, writer) {
2245
+ var f = undefined;
2246
+ f = message.getCompanyList();
2247
+ if (f.length > 0) {
2248
+ writer.writeRepeatedMessage(
2249
+ 1,
2250
+ f,
2251
+ proto.Company.serializeBinaryToWriter
2252
+ );
2253
+ }
2254
+ f = message.getMeta();
2255
+ if (f != null) {
2256
+ writer.writeMessage(
2257
+ 2,
2258
+ f,
2259
+ prisca_v1_global_meta_meta_pb.Meta.serializeBinaryToWriter
2260
+ );
2261
+ }
2262
+ };
2263
+
2264
+
2265
+ /**
2266
+ * repeated Company company = 1;
2267
+ * @return {!Array<!proto.Company>}
2268
+ */
2269
+ proto.GetListCompanyResponse.prototype.getCompanyList = function() {
2270
+ return /** @type{!Array<!proto.Company>} */ (
2271
+ jspb.Message.getRepeatedWrapperField(this, proto.Company, 1));
2272
+ };
2273
+
2274
+
2275
+ /**
2276
+ * @param {!Array<!proto.Company>} value
2277
+ * @return {!proto.GetListCompanyResponse} returns this
2278
+ */
2279
+ proto.GetListCompanyResponse.prototype.setCompanyList = function(value) {
2280
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
2281
+ };
2282
+
2283
+
2284
+ /**
2285
+ * @param {!proto.Company=} opt_value
2286
+ * @param {number=} opt_index
2287
+ * @return {!proto.Company}
2288
+ */
2289
+ proto.GetListCompanyResponse.prototype.addCompany = function(opt_value, opt_index) {
2290
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.Company, opt_index);
2291
+ };
2292
+
2293
+
2294
+ /**
2295
+ * Clears the list making it empty but non-null.
2296
+ * @return {!proto.GetListCompanyResponse} returns this
2297
+ */
2298
+ proto.GetListCompanyResponse.prototype.clearCompanyList = function() {
2299
+ return this.setCompanyList([]);
2300
+ };
2301
+
2302
+
2303
+ /**
2304
+ * optional prisca.v1.global.meta.Meta meta = 2;
2305
+ * @return {?proto.prisca.v1.global.meta.Meta}
2306
+ */
2307
+ proto.GetListCompanyResponse.prototype.getMeta = function() {
2308
+ return /** @type{?proto.prisca.v1.global.meta.Meta} */ (
2309
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.Meta, 2));
2310
+ };
2311
+
2312
+
2313
+ /**
2314
+ * @param {?proto.prisca.v1.global.meta.Meta|undefined} value
2315
+ * @return {!proto.GetListCompanyResponse} returns this
2316
+ */
2317
+ proto.GetListCompanyResponse.prototype.setMeta = function(value) {
2318
+ return jspb.Message.setWrapperField(this, 2, value);
2319
+ };
2320
+
2321
+
2322
+ /**
2323
+ * Clears the message field making it undefined.
2324
+ * @return {!proto.GetListCompanyResponse} returns this
2325
+ */
2326
+ proto.GetListCompanyResponse.prototype.clearMeta = function() {
2327
+ return this.setMeta(undefined);
2328
+ };
2329
+
2330
+
2331
+ /**
2332
+ * Returns whether this field is set.
2333
+ * @return {boolean}
2334
+ */
2335
+ proto.GetListCompanyResponse.prototype.hasMeta = function() {
2336
+ return jspb.Message.getField(this, 2) != null;
2337
+ };
2338
+
2339
+
2340
+ goog.object.extend(exports, proto);