@lansweeper/permissions-grpc 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1178 @@
1
+ // source: permissions.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 = Function('return this')();
17
+
18
+ goog.exportSymbol('proto.checkpermission.CheckPermissionRequest', null, global);
19
+ goog.exportSymbol('proto.checkpermission.CheckPermissionResponse', null, global);
20
+ goog.exportSymbol('proto.checkpermission.GetUserPermissionsRequest', null, global);
21
+ goog.exportSymbol('proto.checkpermission.GetUserPermissionsResponse', null, global);
22
+ goog.exportSymbol('proto.checkpermission.GetUserPermissionsResponse.Permissions', null, global);
23
+ /**
24
+ * Generated by JsPbCodeGenerator.
25
+ * @param {Array=} opt_data Optional initial data array, typically from a
26
+ * server response, or constructed directly in Javascript. The array is used
27
+ * in place and becomes part of the constructed object. It is not cloned.
28
+ * If no data is provided, the constructed object will be empty, but still
29
+ * valid.
30
+ * @extends {jspb.Message}
31
+ * @constructor
32
+ */
33
+ proto.checkpermission.CheckPermissionRequest = function(opt_data) {
34
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
35
+ };
36
+ goog.inherits(proto.checkpermission.CheckPermissionRequest, jspb.Message);
37
+ if (goog.DEBUG && !COMPILED) {
38
+ /**
39
+ * @public
40
+ * @override
41
+ */
42
+ proto.checkpermission.CheckPermissionRequest.displayName = 'proto.checkpermission.CheckPermissionRequest';
43
+ }
44
+ /**
45
+ * Generated by JsPbCodeGenerator.
46
+ * @param {Array=} opt_data Optional initial data array, typically from a
47
+ * server response, or constructed directly in Javascript. The array is used
48
+ * in place and becomes part of the constructed object. It is not cloned.
49
+ * If no data is provided, the constructed object will be empty, but still
50
+ * valid.
51
+ * @extends {jspb.Message}
52
+ * @constructor
53
+ */
54
+ proto.checkpermission.CheckPermissionResponse = function(opt_data) {
55
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.checkpermission.CheckPermissionResponse.repeatedFields_, null);
56
+ };
57
+ goog.inherits(proto.checkpermission.CheckPermissionResponse, jspb.Message);
58
+ if (goog.DEBUG && !COMPILED) {
59
+ /**
60
+ * @public
61
+ * @override
62
+ */
63
+ proto.checkpermission.CheckPermissionResponse.displayName = 'proto.checkpermission.CheckPermissionResponse';
64
+ }
65
+ /**
66
+ * Generated by JsPbCodeGenerator.
67
+ * @param {Array=} opt_data Optional initial data array, typically from a
68
+ * server response, or constructed directly in Javascript. The array is used
69
+ * in place and becomes part of the constructed object. It is not cloned.
70
+ * If no data is provided, the constructed object will be empty, but still
71
+ * valid.
72
+ * @extends {jspb.Message}
73
+ * @constructor
74
+ */
75
+ proto.checkpermission.GetUserPermissionsRequest = function(opt_data) {
76
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
77
+ };
78
+ goog.inherits(proto.checkpermission.GetUserPermissionsRequest, jspb.Message);
79
+ if (goog.DEBUG && !COMPILED) {
80
+ /**
81
+ * @public
82
+ * @override
83
+ */
84
+ proto.checkpermission.GetUserPermissionsRequest.displayName = 'proto.checkpermission.GetUserPermissionsRequest';
85
+ }
86
+ /**
87
+ * Generated by JsPbCodeGenerator.
88
+ * @param {Array=} opt_data Optional initial data array, typically from a
89
+ * server response, or constructed directly in Javascript. The array is used
90
+ * in place and becomes part of the constructed object. It is not cloned.
91
+ * If no data is provided, the constructed object will be empty, but still
92
+ * valid.
93
+ * @extends {jspb.Message}
94
+ * @constructor
95
+ */
96
+ proto.checkpermission.GetUserPermissionsResponse = function(opt_data) {
97
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
98
+ };
99
+ goog.inherits(proto.checkpermission.GetUserPermissionsResponse, jspb.Message);
100
+ if (goog.DEBUG && !COMPILED) {
101
+ /**
102
+ * @public
103
+ * @override
104
+ */
105
+ proto.checkpermission.GetUserPermissionsResponse.displayName = 'proto.checkpermission.GetUserPermissionsResponse';
106
+ }
107
+ /**
108
+ * Generated by JsPbCodeGenerator.
109
+ * @param {Array=} opt_data Optional initial data array, typically from a
110
+ * server response, or constructed directly in Javascript. The array is used
111
+ * in place and becomes part of the constructed object. It is not cloned.
112
+ * If no data is provided, the constructed object will be empty, but still
113
+ * valid.
114
+ * @extends {jspb.Message}
115
+ * @constructor
116
+ */
117
+ proto.checkpermission.GetUserPermissionsResponse.Permissions = function(opt_data) {
118
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.checkpermission.GetUserPermissionsResponse.Permissions.repeatedFields_, null);
119
+ };
120
+ goog.inherits(proto.checkpermission.GetUserPermissionsResponse.Permissions, jspb.Message);
121
+ if (goog.DEBUG && !COMPILED) {
122
+ /**
123
+ * @public
124
+ * @override
125
+ */
126
+ proto.checkpermission.GetUserPermissionsResponse.Permissions.displayName = 'proto.checkpermission.GetUserPermissionsResponse.Permissions';
127
+ }
128
+
129
+
130
+
131
+ if (jspb.Message.GENERATE_TO_OBJECT) {
132
+ /**
133
+ * Creates an object representation of this proto.
134
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
135
+ * Optional fields that are not set will be set to undefined.
136
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
137
+ * For the list of reserved names please see:
138
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
139
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
140
+ * JSPB instance for transitional soy proto support:
141
+ * http://goto/soy-param-migration
142
+ * @return {!Object}
143
+ */
144
+ proto.checkpermission.CheckPermissionRequest.prototype.toObject = function(opt_includeInstance) {
145
+ return proto.checkpermission.CheckPermissionRequest.toObject(opt_includeInstance, this);
146
+ };
147
+
148
+
149
+ /**
150
+ * Static version of the {@see toObject} method.
151
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
152
+ * the JSPB instance for transitional soy proto support:
153
+ * http://goto/soy-param-migration
154
+ * @param {!proto.checkpermission.CheckPermissionRequest} msg The msg instance to transform.
155
+ * @return {!Object}
156
+ * @suppress {unusedLocalVariables} f is only used for nested messages
157
+ */
158
+ proto.checkpermission.CheckPermissionRequest.toObject = function(includeInstance, msg) {
159
+ var f, obj = {
160
+ siteid: jspb.Message.getFieldWithDefault(msg, 1, ""),
161
+ accountid: jspb.Message.getFieldWithDefault(msg, 2, ""),
162
+ action: jspb.Message.getFieldWithDefault(msg, 3, ""),
163
+ traceid: jspb.Message.getFieldWithDefault(msg, 4, "")
164
+ };
165
+
166
+ if (includeInstance) {
167
+ obj.$jspbMessageInstance = msg;
168
+ }
169
+ return obj;
170
+ };
171
+ }
172
+
173
+
174
+ /**
175
+ * Deserializes binary data (in protobuf wire format).
176
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
177
+ * @return {!proto.checkpermission.CheckPermissionRequest}
178
+ */
179
+ proto.checkpermission.CheckPermissionRequest.deserializeBinary = function(bytes) {
180
+ var reader = new jspb.BinaryReader(bytes);
181
+ var msg = new proto.checkpermission.CheckPermissionRequest;
182
+ return proto.checkpermission.CheckPermissionRequest.deserializeBinaryFromReader(msg, reader);
183
+ };
184
+
185
+
186
+ /**
187
+ * Deserializes binary data (in protobuf wire format) from the
188
+ * given reader into the given message object.
189
+ * @param {!proto.checkpermission.CheckPermissionRequest} msg The message object to deserialize into.
190
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
191
+ * @return {!proto.checkpermission.CheckPermissionRequest}
192
+ */
193
+ proto.checkpermission.CheckPermissionRequest.deserializeBinaryFromReader = function(msg, reader) {
194
+ while (reader.nextField()) {
195
+ if (reader.isEndGroup()) {
196
+ break;
197
+ }
198
+ var field = reader.getFieldNumber();
199
+ switch (field) {
200
+ case 1:
201
+ var value = /** @type {string} */ (reader.readString());
202
+ msg.setSiteid(value);
203
+ break;
204
+ case 2:
205
+ var value = /** @type {string} */ (reader.readString());
206
+ msg.setAccountid(value);
207
+ break;
208
+ case 3:
209
+ var value = /** @type {string} */ (reader.readString());
210
+ msg.setAction(value);
211
+ break;
212
+ case 4:
213
+ var value = /** @type {string} */ (reader.readString());
214
+ msg.setTraceid(value);
215
+ break;
216
+ default:
217
+ reader.skipField();
218
+ break;
219
+ }
220
+ }
221
+ return msg;
222
+ };
223
+
224
+
225
+ /**
226
+ * Serializes the message to binary data (in protobuf wire format).
227
+ * @return {!Uint8Array}
228
+ */
229
+ proto.checkpermission.CheckPermissionRequest.prototype.serializeBinary = function() {
230
+ var writer = new jspb.BinaryWriter();
231
+ proto.checkpermission.CheckPermissionRequest.serializeBinaryToWriter(this, writer);
232
+ return writer.getResultBuffer();
233
+ };
234
+
235
+
236
+ /**
237
+ * Serializes the given message to binary data (in protobuf wire
238
+ * format), writing to the given BinaryWriter.
239
+ * @param {!proto.checkpermission.CheckPermissionRequest} message
240
+ * @param {!jspb.BinaryWriter} writer
241
+ * @suppress {unusedLocalVariables} f is only used for nested messages
242
+ */
243
+ proto.checkpermission.CheckPermissionRequest.serializeBinaryToWriter = function(message, writer) {
244
+ var f = undefined;
245
+ f = message.getSiteid();
246
+ if (f.length > 0) {
247
+ writer.writeString(
248
+ 1,
249
+ f
250
+ );
251
+ }
252
+ f = message.getAccountid();
253
+ if (f.length > 0) {
254
+ writer.writeString(
255
+ 2,
256
+ f
257
+ );
258
+ }
259
+ f = message.getAction();
260
+ if (f.length > 0) {
261
+ writer.writeString(
262
+ 3,
263
+ f
264
+ );
265
+ }
266
+ f = message.getTraceid();
267
+ if (f.length > 0) {
268
+ writer.writeString(
269
+ 4,
270
+ f
271
+ );
272
+ }
273
+ };
274
+
275
+
276
+ /**
277
+ * optional string siteId = 1;
278
+ * @return {string}
279
+ */
280
+ proto.checkpermission.CheckPermissionRequest.prototype.getSiteid = function() {
281
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
282
+ };
283
+
284
+
285
+ /**
286
+ * @param {string} value
287
+ * @return {!proto.checkpermission.CheckPermissionRequest} returns this
288
+ */
289
+ proto.checkpermission.CheckPermissionRequest.prototype.setSiteid = function(value) {
290
+ return jspb.Message.setProto3StringField(this, 1, value);
291
+ };
292
+
293
+
294
+ /**
295
+ * optional string accountId = 2;
296
+ * @return {string}
297
+ */
298
+ proto.checkpermission.CheckPermissionRequest.prototype.getAccountid = function() {
299
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
300
+ };
301
+
302
+
303
+ /**
304
+ * @param {string} value
305
+ * @return {!proto.checkpermission.CheckPermissionRequest} returns this
306
+ */
307
+ proto.checkpermission.CheckPermissionRequest.prototype.setAccountid = function(value) {
308
+ return jspb.Message.setProto3StringField(this, 2, value);
309
+ };
310
+
311
+
312
+ /**
313
+ * optional string action = 3;
314
+ * @return {string}
315
+ */
316
+ proto.checkpermission.CheckPermissionRequest.prototype.getAction = function() {
317
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
318
+ };
319
+
320
+
321
+ /**
322
+ * @param {string} value
323
+ * @return {!proto.checkpermission.CheckPermissionRequest} returns this
324
+ */
325
+ proto.checkpermission.CheckPermissionRequest.prototype.setAction = function(value) {
326
+ return jspb.Message.setProto3StringField(this, 3, value);
327
+ };
328
+
329
+
330
+ /**
331
+ * optional string traceId = 4;
332
+ * @return {string}
333
+ */
334
+ proto.checkpermission.CheckPermissionRequest.prototype.getTraceid = function() {
335
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
336
+ };
337
+
338
+
339
+ /**
340
+ * @param {string} value
341
+ * @return {!proto.checkpermission.CheckPermissionRequest} returns this
342
+ */
343
+ proto.checkpermission.CheckPermissionRequest.prototype.setTraceid = function(value) {
344
+ return jspb.Message.setProto3StringField(this, 4, value);
345
+ };
346
+
347
+
348
+
349
+ /**
350
+ * List of repeated fields within this message type.
351
+ * @private {!Array<number>}
352
+ * @const
353
+ */
354
+ proto.checkpermission.CheckPermissionResponse.repeatedFields_ = [2,3,4];
355
+
356
+
357
+
358
+ if (jspb.Message.GENERATE_TO_OBJECT) {
359
+ /**
360
+ * Creates an object representation of this proto.
361
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
362
+ * Optional fields that are not set will be set to undefined.
363
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
364
+ * For the list of reserved names please see:
365
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
366
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
367
+ * JSPB instance for transitional soy proto support:
368
+ * http://goto/soy-param-migration
369
+ * @return {!Object}
370
+ */
371
+ proto.checkpermission.CheckPermissionResponse.prototype.toObject = function(opt_includeInstance) {
372
+ return proto.checkpermission.CheckPermissionResponse.toObject(opt_includeInstance, this);
373
+ };
374
+
375
+
376
+ /**
377
+ * Static version of the {@see toObject} method.
378
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
379
+ * the JSPB instance for transitional soy proto support:
380
+ * http://goto/soy-param-migration
381
+ * @param {!proto.checkpermission.CheckPermissionResponse} msg The msg instance to transform.
382
+ * @return {!Object}
383
+ * @suppress {unusedLocalVariables} f is only used for nested messages
384
+ */
385
+ proto.checkpermission.CheckPermissionResponse.toObject = function(includeInstance, msg) {
386
+ var f, obj = {
387
+ granted: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
388
+ installationsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f,
389
+ assetscopesList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f,
390
+ derivedpermissionsList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f
391
+ };
392
+
393
+ if (includeInstance) {
394
+ obj.$jspbMessageInstance = msg;
395
+ }
396
+ return obj;
397
+ };
398
+ }
399
+
400
+
401
+ /**
402
+ * Deserializes binary data (in protobuf wire format).
403
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
404
+ * @return {!proto.checkpermission.CheckPermissionResponse}
405
+ */
406
+ proto.checkpermission.CheckPermissionResponse.deserializeBinary = function(bytes) {
407
+ var reader = new jspb.BinaryReader(bytes);
408
+ var msg = new proto.checkpermission.CheckPermissionResponse;
409
+ return proto.checkpermission.CheckPermissionResponse.deserializeBinaryFromReader(msg, reader);
410
+ };
411
+
412
+
413
+ /**
414
+ * Deserializes binary data (in protobuf wire format) from the
415
+ * given reader into the given message object.
416
+ * @param {!proto.checkpermission.CheckPermissionResponse} msg The message object to deserialize into.
417
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
418
+ * @return {!proto.checkpermission.CheckPermissionResponse}
419
+ */
420
+ proto.checkpermission.CheckPermissionResponse.deserializeBinaryFromReader = function(msg, reader) {
421
+ while (reader.nextField()) {
422
+ if (reader.isEndGroup()) {
423
+ break;
424
+ }
425
+ var field = reader.getFieldNumber();
426
+ switch (field) {
427
+ case 1:
428
+ var value = /** @type {boolean} */ (reader.readBool());
429
+ msg.setGranted(value);
430
+ break;
431
+ case 2:
432
+ var value = /** @type {string} */ (reader.readString());
433
+ msg.addInstallations(value);
434
+ break;
435
+ case 3:
436
+ var value = /** @type {string} */ (reader.readString());
437
+ msg.addAssetscopes(value);
438
+ break;
439
+ case 4:
440
+ var value = /** @type {string} */ (reader.readString());
441
+ msg.addDerivedpermissions(value);
442
+ break;
443
+ default:
444
+ reader.skipField();
445
+ break;
446
+ }
447
+ }
448
+ return msg;
449
+ };
450
+
451
+
452
+ /**
453
+ * Serializes the message to binary data (in protobuf wire format).
454
+ * @return {!Uint8Array}
455
+ */
456
+ proto.checkpermission.CheckPermissionResponse.prototype.serializeBinary = function() {
457
+ var writer = new jspb.BinaryWriter();
458
+ proto.checkpermission.CheckPermissionResponse.serializeBinaryToWriter(this, writer);
459
+ return writer.getResultBuffer();
460
+ };
461
+
462
+
463
+ /**
464
+ * Serializes the given message to binary data (in protobuf wire
465
+ * format), writing to the given BinaryWriter.
466
+ * @param {!proto.checkpermission.CheckPermissionResponse} message
467
+ * @param {!jspb.BinaryWriter} writer
468
+ * @suppress {unusedLocalVariables} f is only used for nested messages
469
+ */
470
+ proto.checkpermission.CheckPermissionResponse.serializeBinaryToWriter = function(message, writer) {
471
+ var f = undefined;
472
+ f = message.getGranted();
473
+ if (f) {
474
+ writer.writeBool(
475
+ 1,
476
+ f
477
+ );
478
+ }
479
+ f = message.getInstallationsList();
480
+ if (f.length > 0) {
481
+ writer.writeRepeatedString(
482
+ 2,
483
+ f
484
+ );
485
+ }
486
+ f = message.getAssetscopesList();
487
+ if (f.length > 0) {
488
+ writer.writeRepeatedString(
489
+ 3,
490
+ f
491
+ );
492
+ }
493
+ f = message.getDerivedpermissionsList();
494
+ if (f.length > 0) {
495
+ writer.writeRepeatedString(
496
+ 4,
497
+ f
498
+ );
499
+ }
500
+ };
501
+
502
+
503
+ /**
504
+ * optional bool granted = 1;
505
+ * @return {boolean}
506
+ */
507
+ proto.checkpermission.CheckPermissionResponse.prototype.getGranted = function() {
508
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
509
+ };
510
+
511
+
512
+ /**
513
+ * @param {boolean} value
514
+ * @return {!proto.checkpermission.CheckPermissionResponse} returns this
515
+ */
516
+ proto.checkpermission.CheckPermissionResponse.prototype.setGranted = function(value) {
517
+ return jspb.Message.setProto3BooleanField(this, 1, value);
518
+ };
519
+
520
+
521
+ /**
522
+ * repeated string installations = 2;
523
+ * @return {!Array<string>}
524
+ */
525
+ proto.checkpermission.CheckPermissionResponse.prototype.getInstallationsList = function() {
526
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
527
+ };
528
+
529
+
530
+ /**
531
+ * @param {!Array<string>} value
532
+ * @return {!proto.checkpermission.CheckPermissionResponse} returns this
533
+ */
534
+ proto.checkpermission.CheckPermissionResponse.prototype.setInstallationsList = function(value) {
535
+ return jspb.Message.setField(this, 2, value || []);
536
+ };
537
+
538
+
539
+ /**
540
+ * @param {string} value
541
+ * @param {number=} opt_index
542
+ * @return {!proto.checkpermission.CheckPermissionResponse} returns this
543
+ */
544
+ proto.checkpermission.CheckPermissionResponse.prototype.addInstallations = function(value, opt_index) {
545
+ return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
546
+ };
547
+
548
+
549
+ /**
550
+ * Clears the list making it empty but non-null.
551
+ * @return {!proto.checkpermission.CheckPermissionResponse} returns this
552
+ */
553
+ proto.checkpermission.CheckPermissionResponse.prototype.clearInstallationsList = function() {
554
+ return this.setInstallationsList([]);
555
+ };
556
+
557
+
558
+ /**
559
+ * repeated string assetScopes = 3;
560
+ * @return {!Array<string>}
561
+ */
562
+ proto.checkpermission.CheckPermissionResponse.prototype.getAssetscopesList = function() {
563
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 3));
564
+ };
565
+
566
+
567
+ /**
568
+ * @param {!Array<string>} value
569
+ * @return {!proto.checkpermission.CheckPermissionResponse} returns this
570
+ */
571
+ proto.checkpermission.CheckPermissionResponse.prototype.setAssetscopesList = function(value) {
572
+ return jspb.Message.setField(this, 3, value || []);
573
+ };
574
+
575
+
576
+ /**
577
+ * @param {string} value
578
+ * @param {number=} opt_index
579
+ * @return {!proto.checkpermission.CheckPermissionResponse} returns this
580
+ */
581
+ proto.checkpermission.CheckPermissionResponse.prototype.addAssetscopes = function(value, opt_index) {
582
+ return jspb.Message.addToRepeatedField(this, 3, value, opt_index);
583
+ };
584
+
585
+
586
+ /**
587
+ * Clears the list making it empty but non-null.
588
+ * @return {!proto.checkpermission.CheckPermissionResponse} returns this
589
+ */
590
+ proto.checkpermission.CheckPermissionResponse.prototype.clearAssetscopesList = function() {
591
+ return this.setAssetscopesList([]);
592
+ };
593
+
594
+
595
+ /**
596
+ * repeated string derivedPermissions = 4;
597
+ * @return {!Array<string>}
598
+ */
599
+ proto.checkpermission.CheckPermissionResponse.prototype.getDerivedpermissionsList = function() {
600
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 4));
601
+ };
602
+
603
+
604
+ /**
605
+ * @param {!Array<string>} value
606
+ * @return {!proto.checkpermission.CheckPermissionResponse} returns this
607
+ */
608
+ proto.checkpermission.CheckPermissionResponse.prototype.setDerivedpermissionsList = function(value) {
609
+ return jspb.Message.setField(this, 4, value || []);
610
+ };
611
+
612
+
613
+ /**
614
+ * @param {string} value
615
+ * @param {number=} opt_index
616
+ * @return {!proto.checkpermission.CheckPermissionResponse} returns this
617
+ */
618
+ proto.checkpermission.CheckPermissionResponse.prototype.addDerivedpermissions = function(value, opt_index) {
619
+ return jspb.Message.addToRepeatedField(this, 4, value, opt_index);
620
+ };
621
+
622
+
623
+ /**
624
+ * Clears the list making it empty but non-null.
625
+ * @return {!proto.checkpermission.CheckPermissionResponse} returns this
626
+ */
627
+ proto.checkpermission.CheckPermissionResponse.prototype.clearDerivedpermissionsList = function() {
628
+ return this.setDerivedpermissionsList([]);
629
+ };
630
+
631
+
632
+
633
+
634
+
635
+ if (jspb.Message.GENERATE_TO_OBJECT) {
636
+ /**
637
+ * Creates an object representation of this proto.
638
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
639
+ * Optional fields that are not set will be set to undefined.
640
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
641
+ * For the list of reserved names please see:
642
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
643
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
644
+ * JSPB instance for transitional soy proto support:
645
+ * http://goto/soy-param-migration
646
+ * @return {!Object}
647
+ */
648
+ proto.checkpermission.GetUserPermissionsRequest.prototype.toObject = function(opt_includeInstance) {
649
+ return proto.checkpermission.GetUserPermissionsRequest.toObject(opt_includeInstance, this);
650
+ };
651
+
652
+
653
+ /**
654
+ * Static version of the {@see toObject} method.
655
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
656
+ * the JSPB instance for transitional soy proto support:
657
+ * http://goto/soy-param-migration
658
+ * @param {!proto.checkpermission.GetUserPermissionsRequest} msg The msg instance to transform.
659
+ * @return {!Object}
660
+ * @suppress {unusedLocalVariables} f is only used for nested messages
661
+ */
662
+ proto.checkpermission.GetUserPermissionsRequest.toObject = function(includeInstance, msg) {
663
+ var f, obj = {
664
+ userid: jspb.Message.getFieldWithDefault(msg, 1, ""),
665
+ siteid: jspb.Message.getFieldWithDefault(msg, 2, ""),
666
+ traceid: jspb.Message.getFieldWithDefault(msg, 3, "")
667
+ };
668
+
669
+ if (includeInstance) {
670
+ obj.$jspbMessageInstance = msg;
671
+ }
672
+ return obj;
673
+ };
674
+ }
675
+
676
+
677
+ /**
678
+ * Deserializes binary data (in protobuf wire format).
679
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
680
+ * @return {!proto.checkpermission.GetUserPermissionsRequest}
681
+ */
682
+ proto.checkpermission.GetUserPermissionsRequest.deserializeBinary = function(bytes) {
683
+ var reader = new jspb.BinaryReader(bytes);
684
+ var msg = new proto.checkpermission.GetUserPermissionsRequest;
685
+ return proto.checkpermission.GetUserPermissionsRequest.deserializeBinaryFromReader(msg, reader);
686
+ };
687
+
688
+
689
+ /**
690
+ * Deserializes binary data (in protobuf wire format) from the
691
+ * given reader into the given message object.
692
+ * @param {!proto.checkpermission.GetUserPermissionsRequest} msg The message object to deserialize into.
693
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
694
+ * @return {!proto.checkpermission.GetUserPermissionsRequest}
695
+ */
696
+ proto.checkpermission.GetUserPermissionsRequest.deserializeBinaryFromReader = function(msg, reader) {
697
+ while (reader.nextField()) {
698
+ if (reader.isEndGroup()) {
699
+ break;
700
+ }
701
+ var field = reader.getFieldNumber();
702
+ switch (field) {
703
+ case 1:
704
+ var value = /** @type {string} */ (reader.readString());
705
+ msg.setUserid(value);
706
+ break;
707
+ case 2:
708
+ var value = /** @type {string} */ (reader.readString());
709
+ msg.setSiteid(value);
710
+ break;
711
+ case 3:
712
+ var value = /** @type {string} */ (reader.readString());
713
+ msg.setTraceid(value);
714
+ break;
715
+ default:
716
+ reader.skipField();
717
+ break;
718
+ }
719
+ }
720
+ return msg;
721
+ };
722
+
723
+
724
+ /**
725
+ * Serializes the message to binary data (in protobuf wire format).
726
+ * @return {!Uint8Array}
727
+ */
728
+ proto.checkpermission.GetUserPermissionsRequest.prototype.serializeBinary = function() {
729
+ var writer = new jspb.BinaryWriter();
730
+ proto.checkpermission.GetUserPermissionsRequest.serializeBinaryToWriter(this, writer);
731
+ return writer.getResultBuffer();
732
+ };
733
+
734
+
735
+ /**
736
+ * Serializes the given message to binary data (in protobuf wire
737
+ * format), writing to the given BinaryWriter.
738
+ * @param {!proto.checkpermission.GetUserPermissionsRequest} message
739
+ * @param {!jspb.BinaryWriter} writer
740
+ * @suppress {unusedLocalVariables} f is only used for nested messages
741
+ */
742
+ proto.checkpermission.GetUserPermissionsRequest.serializeBinaryToWriter = function(message, writer) {
743
+ var f = undefined;
744
+ f = message.getUserid();
745
+ if (f.length > 0) {
746
+ writer.writeString(
747
+ 1,
748
+ f
749
+ );
750
+ }
751
+ f = message.getSiteid();
752
+ if (f.length > 0) {
753
+ writer.writeString(
754
+ 2,
755
+ f
756
+ );
757
+ }
758
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
759
+ if (f != null) {
760
+ writer.writeString(
761
+ 3,
762
+ f
763
+ );
764
+ }
765
+ };
766
+
767
+
768
+ /**
769
+ * optional string userId = 1;
770
+ * @return {string}
771
+ */
772
+ proto.checkpermission.GetUserPermissionsRequest.prototype.getUserid = function() {
773
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
774
+ };
775
+
776
+
777
+ /**
778
+ * @param {string} value
779
+ * @return {!proto.checkpermission.GetUserPermissionsRequest} returns this
780
+ */
781
+ proto.checkpermission.GetUserPermissionsRequest.prototype.setUserid = function(value) {
782
+ return jspb.Message.setProto3StringField(this, 1, value);
783
+ };
784
+
785
+
786
+ /**
787
+ * optional string siteId = 2;
788
+ * @return {string}
789
+ */
790
+ proto.checkpermission.GetUserPermissionsRequest.prototype.getSiteid = function() {
791
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
792
+ };
793
+
794
+
795
+ /**
796
+ * @param {string} value
797
+ * @return {!proto.checkpermission.GetUserPermissionsRequest} returns this
798
+ */
799
+ proto.checkpermission.GetUserPermissionsRequest.prototype.setSiteid = function(value) {
800
+ return jspb.Message.setProto3StringField(this, 2, value);
801
+ };
802
+
803
+
804
+ /**
805
+ * optional string traceId = 3;
806
+ * @return {string}
807
+ */
808
+ proto.checkpermission.GetUserPermissionsRequest.prototype.getTraceid = function() {
809
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
810
+ };
811
+
812
+
813
+ /**
814
+ * @param {string} value
815
+ * @return {!proto.checkpermission.GetUserPermissionsRequest} returns this
816
+ */
817
+ proto.checkpermission.GetUserPermissionsRequest.prototype.setTraceid = function(value) {
818
+ return jspb.Message.setField(this, 3, value);
819
+ };
820
+
821
+
822
+ /**
823
+ * Clears the field making it undefined.
824
+ * @return {!proto.checkpermission.GetUserPermissionsRequest} returns this
825
+ */
826
+ proto.checkpermission.GetUserPermissionsRequest.prototype.clearTraceid = function() {
827
+ return jspb.Message.setField(this, 3, undefined);
828
+ };
829
+
830
+
831
+ /**
832
+ * Returns whether this field is set.
833
+ * @return {boolean}
834
+ */
835
+ proto.checkpermission.GetUserPermissionsRequest.prototype.hasTraceid = function() {
836
+ return jspb.Message.getField(this, 3) != null;
837
+ };
838
+
839
+
840
+
841
+
842
+
843
+ if (jspb.Message.GENERATE_TO_OBJECT) {
844
+ /**
845
+ * Creates an object representation of this proto.
846
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
847
+ * Optional fields that are not set will be set to undefined.
848
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
849
+ * For the list of reserved names please see:
850
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
851
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
852
+ * JSPB instance for transitional soy proto support:
853
+ * http://goto/soy-param-migration
854
+ * @return {!Object}
855
+ */
856
+ proto.checkpermission.GetUserPermissionsResponse.prototype.toObject = function(opt_includeInstance) {
857
+ return proto.checkpermission.GetUserPermissionsResponse.toObject(opt_includeInstance, this);
858
+ };
859
+
860
+
861
+ /**
862
+ * Static version of the {@see toObject} method.
863
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
864
+ * the JSPB instance for transitional soy proto support:
865
+ * http://goto/soy-param-migration
866
+ * @param {!proto.checkpermission.GetUserPermissionsResponse} msg The msg instance to transform.
867
+ * @return {!Object}
868
+ * @suppress {unusedLocalVariables} f is only used for nested messages
869
+ */
870
+ proto.checkpermission.GetUserPermissionsResponse.toObject = function(includeInstance, msg) {
871
+ var f, obj = {
872
+ permissionsMap: (f = msg.getPermissionsMap()) ? f.toObject(includeInstance, proto.checkpermission.GetUserPermissionsResponse.Permissions.toObject) : []
873
+ };
874
+
875
+ if (includeInstance) {
876
+ obj.$jspbMessageInstance = msg;
877
+ }
878
+ return obj;
879
+ };
880
+ }
881
+
882
+
883
+ /**
884
+ * Deserializes binary data (in protobuf wire format).
885
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
886
+ * @return {!proto.checkpermission.GetUserPermissionsResponse}
887
+ */
888
+ proto.checkpermission.GetUserPermissionsResponse.deserializeBinary = function(bytes) {
889
+ var reader = new jspb.BinaryReader(bytes);
890
+ var msg = new proto.checkpermission.GetUserPermissionsResponse;
891
+ return proto.checkpermission.GetUserPermissionsResponse.deserializeBinaryFromReader(msg, reader);
892
+ };
893
+
894
+
895
+ /**
896
+ * Deserializes binary data (in protobuf wire format) from the
897
+ * given reader into the given message object.
898
+ * @param {!proto.checkpermission.GetUserPermissionsResponse} msg The message object to deserialize into.
899
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
900
+ * @return {!proto.checkpermission.GetUserPermissionsResponse}
901
+ */
902
+ proto.checkpermission.GetUserPermissionsResponse.deserializeBinaryFromReader = function(msg, reader) {
903
+ while (reader.nextField()) {
904
+ if (reader.isEndGroup()) {
905
+ break;
906
+ }
907
+ var field = reader.getFieldNumber();
908
+ switch (field) {
909
+ case 1:
910
+ var value = msg.getPermissionsMap();
911
+ reader.readMessage(value, function(message, reader) {
912
+ jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.checkpermission.GetUserPermissionsResponse.Permissions.deserializeBinaryFromReader, "", new proto.checkpermission.GetUserPermissionsResponse.Permissions());
913
+ });
914
+ break;
915
+ default:
916
+ reader.skipField();
917
+ break;
918
+ }
919
+ }
920
+ return msg;
921
+ };
922
+
923
+
924
+ /**
925
+ * Serializes the message to binary data (in protobuf wire format).
926
+ * @return {!Uint8Array}
927
+ */
928
+ proto.checkpermission.GetUserPermissionsResponse.prototype.serializeBinary = function() {
929
+ var writer = new jspb.BinaryWriter();
930
+ proto.checkpermission.GetUserPermissionsResponse.serializeBinaryToWriter(this, writer);
931
+ return writer.getResultBuffer();
932
+ };
933
+
934
+
935
+ /**
936
+ * Serializes the given message to binary data (in protobuf wire
937
+ * format), writing to the given BinaryWriter.
938
+ * @param {!proto.checkpermission.GetUserPermissionsResponse} message
939
+ * @param {!jspb.BinaryWriter} writer
940
+ * @suppress {unusedLocalVariables} f is only used for nested messages
941
+ */
942
+ proto.checkpermission.GetUserPermissionsResponse.serializeBinaryToWriter = function(message, writer) {
943
+ var f = undefined;
944
+ f = message.getPermissionsMap(true);
945
+ if (f && f.getLength() > 0) {
946
+ f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.checkpermission.GetUserPermissionsResponse.Permissions.serializeBinaryToWriter);
947
+ }
948
+ };
949
+
950
+
951
+
952
+ /**
953
+ * List of repeated fields within this message type.
954
+ * @private {!Array<number>}
955
+ * @const
956
+ */
957
+ proto.checkpermission.GetUserPermissionsResponse.Permissions.repeatedFields_ = [1,2];
958
+
959
+
960
+
961
+ if (jspb.Message.GENERATE_TO_OBJECT) {
962
+ /**
963
+ * Creates an object representation of this proto.
964
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
965
+ * Optional fields that are not set will be set to undefined.
966
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
967
+ * For the list of reserved names please see:
968
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
969
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
970
+ * JSPB instance for transitional soy proto support:
971
+ * http://goto/soy-param-migration
972
+ * @return {!Object}
973
+ */
974
+ proto.checkpermission.GetUserPermissionsResponse.Permissions.prototype.toObject = function(opt_includeInstance) {
975
+ return proto.checkpermission.GetUserPermissionsResponse.Permissions.toObject(opt_includeInstance, this);
976
+ };
977
+
978
+
979
+ /**
980
+ * Static version of the {@see toObject} method.
981
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
982
+ * the JSPB instance for transitional soy proto support:
983
+ * http://goto/soy-param-migration
984
+ * @param {!proto.checkpermission.GetUserPermissionsResponse.Permissions} msg The msg instance to transform.
985
+ * @return {!Object}
986
+ * @suppress {unusedLocalVariables} f is only used for nested messages
987
+ */
988
+ proto.checkpermission.GetUserPermissionsResponse.Permissions.toObject = function(includeInstance, msg) {
989
+ var f, obj = {
990
+ installationsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
991
+ assetscopesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f
992
+ };
993
+
994
+ if (includeInstance) {
995
+ obj.$jspbMessageInstance = msg;
996
+ }
997
+ return obj;
998
+ };
999
+ }
1000
+
1001
+
1002
+ /**
1003
+ * Deserializes binary data (in protobuf wire format).
1004
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1005
+ * @return {!proto.checkpermission.GetUserPermissionsResponse.Permissions}
1006
+ */
1007
+ proto.checkpermission.GetUserPermissionsResponse.Permissions.deserializeBinary = function(bytes) {
1008
+ var reader = new jspb.BinaryReader(bytes);
1009
+ var msg = new proto.checkpermission.GetUserPermissionsResponse.Permissions;
1010
+ return proto.checkpermission.GetUserPermissionsResponse.Permissions.deserializeBinaryFromReader(msg, reader);
1011
+ };
1012
+
1013
+
1014
+ /**
1015
+ * Deserializes binary data (in protobuf wire format) from the
1016
+ * given reader into the given message object.
1017
+ * @param {!proto.checkpermission.GetUserPermissionsResponse.Permissions} msg The message object to deserialize into.
1018
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1019
+ * @return {!proto.checkpermission.GetUserPermissionsResponse.Permissions}
1020
+ */
1021
+ proto.checkpermission.GetUserPermissionsResponse.Permissions.deserializeBinaryFromReader = function(msg, reader) {
1022
+ while (reader.nextField()) {
1023
+ if (reader.isEndGroup()) {
1024
+ break;
1025
+ }
1026
+ var field = reader.getFieldNumber();
1027
+ switch (field) {
1028
+ case 1:
1029
+ var value = /** @type {string} */ (reader.readString());
1030
+ msg.addInstallations(value);
1031
+ break;
1032
+ case 2:
1033
+ var value = /** @type {string} */ (reader.readString());
1034
+ msg.addAssetscopes(value);
1035
+ break;
1036
+ default:
1037
+ reader.skipField();
1038
+ break;
1039
+ }
1040
+ }
1041
+ return msg;
1042
+ };
1043
+
1044
+
1045
+ /**
1046
+ * Serializes the message to binary data (in protobuf wire format).
1047
+ * @return {!Uint8Array}
1048
+ */
1049
+ proto.checkpermission.GetUserPermissionsResponse.Permissions.prototype.serializeBinary = function() {
1050
+ var writer = new jspb.BinaryWriter();
1051
+ proto.checkpermission.GetUserPermissionsResponse.Permissions.serializeBinaryToWriter(this, writer);
1052
+ return writer.getResultBuffer();
1053
+ };
1054
+
1055
+
1056
+ /**
1057
+ * Serializes the given message to binary data (in protobuf wire
1058
+ * format), writing to the given BinaryWriter.
1059
+ * @param {!proto.checkpermission.GetUserPermissionsResponse.Permissions} message
1060
+ * @param {!jspb.BinaryWriter} writer
1061
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1062
+ */
1063
+ proto.checkpermission.GetUserPermissionsResponse.Permissions.serializeBinaryToWriter = function(message, writer) {
1064
+ var f = undefined;
1065
+ f = message.getInstallationsList();
1066
+ if (f.length > 0) {
1067
+ writer.writeRepeatedString(
1068
+ 1,
1069
+ f
1070
+ );
1071
+ }
1072
+ f = message.getAssetscopesList();
1073
+ if (f.length > 0) {
1074
+ writer.writeRepeatedString(
1075
+ 2,
1076
+ f
1077
+ );
1078
+ }
1079
+ };
1080
+
1081
+
1082
+ /**
1083
+ * repeated string installations = 1;
1084
+ * @return {!Array<string>}
1085
+ */
1086
+ proto.checkpermission.GetUserPermissionsResponse.Permissions.prototype.getInstallationsList = function() {
1087
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
1088
+ };
1089
+
1090
+
1091
+ /**
1092
+ * @param {!Array<string>} value
1093
+ * @return {!proto.checkpermission.GetUserPermissionsResponse.Permissions} returns this
1094
+ */
1095
+ proto.checkpermission.GetUserPermissionsResponse.Permissions.prototype.setInstallationsList = function(value) {
1096
+ return jspb.Message.setField(this, 1, value || []);
1097
+ };
1098
+
1099
+
1100
+ /**
1101
+ * @param {string} value
1102
+ * @param {number=} opt_index
1103
+ * @return {!proto.checkpermission.GetUserPermissionsResponse.Permissions} returns this
1104
+ */
1105
+ proto.checkpermission.GetUserPermissionsResponse.Permissions.prototype.addInstallations = function(value, opt_index) {
1106
+ return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
1107
+ };
1108
+
1109
+
1110
+ /**
1111
+ * Clears the list making it empty but non-null.
1112
+ * @return {!proto.checkpermission.GetUserPermissionsResponse.Permissions} returns this
1113
+ */
1114
+ proto.checkpermission.GetUserPermissionsResponse.Permissions.prototype.clearInstallationsList = function() {
1115
+ return this.setInstallationsList([]);
1116
+ };
1117
+
1118
+
1119
+ /**
1120
+ * repeated string assetScopes = 2;
1121
+ * @return {!Array<string>}
1122
+ */
1123
+ proto.checkpermission.GetUserPermissionsResponse.Permissions.prototype.getAssetscopesList = function() {
1124
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
1125
+ };
1126
+
1127
+
1128
+ /**
1129
+ * @param {!Array<string>} value
1130
+ * @return {!proto.checkpermission.GetUserPermissionsResponse.Permissions} returns this
1131
+ */
1132
+ proto.checkpermission.GetUserPermissionsResponse.Permissions.prototype.setAssetscopesList = function(value) {
1133
+ return jspb.Message.setField(this, 2, value || []);
1134
+ };
1135
+
1136
+
1137
+ /**
1138
+ * @param {string} value
1139
+ * @param {number=} opt_index
1140
+ * @return {!proto.checkpermission.GetUserPermissionsResponse.Permissions} returns this
1141
+ */
1142
+ proto.checkpermission.GetUserPermissionsResponse.Permissions.prototype.addAssetscopes = function(value, opt_index) {
1143
+ return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
1144
+ };
1145
+
1146
+
1147
+ /**
1148
+ * Clears the list making it empty but non-null.
1149
+ * @return {!proto.checkpermission.GetUserPermissionsResponse.Permissions} returns this
1150
+ */
1151
+ proto.checkpermission.GetUserPermissionsResponse.Permissions.prototype.clearAssetscopesList = function() {
1152
+ return this.setAssetscopesList([]);
1153
+ };
1154
+
1155
+
1156
+ /**
1157
+ * map<string, Permissions> permissions = 1;
1158
+ * @param {boolean=} opt_noLazyCreate Do not create the map if
1159
+ * empty, instead returning `undefined`
1160
+ * @return {!jspb.Map<string,!proto.checkpermission.GetUserPermissionsResponse.Permissions>}
1161
+ */
1162
+ proto.checkpermission.GetUserPermissionsResponse.prototype.getPermissionsMap = function(opt_noLazyCreate) {
1163
+ return /** @type {!jspb.Map<string,!proto.checkpermission.GetUserPermissionsResponse.Permissions>} */ (
1164
+ jspb.Message.getMapField(this, 1, opt_noLazyCreate,
1165
+ proto.checkpermission.GetUserPermissionsResponse.Permissions));
1166
+ };
1167
+
1168
+
1169
+ /**
1170
+ * Clears values from the map. The map will be non-null.
1171
+ * @return {!proto.checkpermission.GetUserPermissionsResponse} returns this
1172
+ */
1173
+ proto.checkpermission.GetUserPermissionsResponse.prototype.clearPermissionsMap = function() {
1174
+ this.getPermissionsMap().clear();
1175
+ return this;};
1176
+
1177
+
1178
+ goog.object.extend(exports, proto.checkpermission);