github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/js/proto/permission_pb.js (about) 1 // source: permission.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 var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); 19 goog.object.extend(proto, gogoproto_gogo_pb); 20 goog.exportSymbol('proto.permission.AccountPermissions', null, global); 21 goog.exportSymbol('proto.permission.BasePermissions', null, global); 22 goog.exportSymbol('proto.permission.PermArgs', 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.permission.AccountPermissions = function(opt_data) { 34 jspb.Message.initialize(this, opt_data, 0, -1, proto.permission.AccountPermissions.repeatedFields_, null); 35 }; 36 goog.inherits(proto.permission.AccountPermissions, jspb.Message); 37 if (goog.DEBUG && !COMPILED) { 38 /** 39 * @public 40 * @override 41 */ 42 proto.permission.AccountPermissions.displayName = 'proto.permission.AccountPermissions'; 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.permission.BasePermissions = function(opt_data) { 55 jspb.Message.initialize(this, opt_data, 0, -1, null, null); 56 }; 57 goog.inherits(proto.permission.BasePermissions, jspb.Message); 58 if (goog.DEBUG && !COMPILED) { 59 /** 60 * @public 61 * @override 62 */ 63 proto.permission.BasePermissions.displayName = 'proto.permission.BasePermissions'; 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.permission.PermArgs = function(opt_data) { 76 jspb.Message.initialize(this, opt_data, 0, -1, null, null); 77 }; 78 goog.inherits(proto.permission.PermArgs, jspb.Message); 79 if (goog.DEBUG && !COMPILED) { 80 /** 81 * @public 82 * @override 83 */ 84 proto.permission.PermArgs.displayName = 'proto.permission.PermArgs'; 85 } 86 87 /** 88 * List of repeated fields within this message type. 89 * @private {!Array<number>} 90 * @const 91 */ 92 proto.permission.AccountPermissions.repeatedFields_ = [2]; 93 94 95 96 if (jspb.Message.GENERATE_TO_OBJECT) { 97 /** 98 * Creates an object representation of this proto. 99 * Field names that are reserved in JavaScript and will be renamed to pb_name. 100 * Optional fields that are not set will be set to undefined. 101 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. 102 * For the list of reserved names please see: 103 * net/proto2/compiler/js/internal/generator.cc#kKeyword. 104 * @param {boolean=} opt_includeInstance Deprecated. whether to include the 105 * JSPB instance for transitional soy proto support: 106 * http://goto/soy-param-migration 107 * @return {!Object} 108 */ 109 proto.permission.AccountPermissions.prototype.toObject = function(opt_includeInstance) { 110 return proto.permission.AccountPermissions.toObject(opt_includeInstance, this); 111 }; 112 113 114 /** 115 * Static version of the {@see toObject} method. 116 * @param {boolean|undefined} includeInstance Deprecated. Whether to include 117 * the JSPB instance for transitional soy proto support: 118 * http://goto/soy-param-migration 119 * @param {!proto.permission.AccountPermissions} msg The msg instance to transform. 120 * @return {!Object} 121 * @suppress {unusedLocalVariables} f is only used for nested messages 122 */ 123 proto.permission.AccountPermissions.toObject = function(includeInstance, msg) { 124 var f, obj = { 125 base: (f = msg.getBase()) && proto.permission.BasePermissions.toObject(includeInstance, f), 126 rolesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f 127 }; 128 129 if (includeInstance) { 130 obj.$jspbMessageInstance = msg; 131 } 132 return obj; 133 }; 134 } 135 136 137 /** 138 * Deserializes binary data (in protobuf wire format). 139 * @param {jspb.ByteSource} bytes The bytes to deserialize. 140 * @return {!proto.permission.AccountPermissions} 141 */ 142 proto.permission.AccountPermissions.deserializeBinary = function(bytes) { 143 var reader = new jspb.BinaryReader(bytes); 144 var msg = new proto.permission.AccountPermissions; 145 return proto.permission.AccountPermissions.deserializeBinaryFromReader(msg, reader); 146 }; 147 148 149 /** 150 * Deserializes binary data (in protobuf wire format) from the 151 * given reader into the given message object. 152 * @param {!proto.permission.AccountPermissions} msg The message object to deserialize into. 153 * @param {!jspb.BinaryReader} reader The BinaryReader to use. 154 * @return {!proto.permission.AccountPermissions} 155 */ 156 proto.permission.AccountPermissions.deserializeBinaryFromReader = function(msg, reader) { 157 while (reader.nextField()) { 158 if (reader.isEndGroup()) { 159 break; 160 } 161 var field = reader.getFieldNumber(); 162 switch (field) { 163 case 1: 164 var value = new proto.permission.BasePermissions; 165 reader.readMessage(value,proto.permission.BasePermissions.deserializeBinaryFromReader); 166 msg.setBase(value); 167 break; 168 case 2: 169 var value = /** @type {string} */ (reader.readString()); 170 msg.addRoles(value); 171 break; 172 default: 173 reader.skipField(); 174 break; 175 } 176 } 177 return msg; 178 }; 179 180 181 /** 182 * Serializes the message to binary data (in protobuf wire format). 183 * @return {!Uint8Array} 184 */ 185 proto.permission.AccountPermissions.prototype.serializeBinary = function() { 186 var writer = new jspb.BinaryWriter(); 187 proto.permission.AccountPermissions.serializeBinaryToWriter(this, writer); 188 return writer.getResultBuffer(); 189 }; 190 191 192 /** 193 * Serializes the given message to binary data (in protobuf wire 194 * format), writing to the given BinaryWriter. 195 * @param {!proto.permission.AccountPermissions} message 196 * @param {!jspb.BinaryWriter} writer 197 * @suppress {unusedLocalVariables} f is only used for nested messages 198 */ 199 proto.permission.AccountPermissions.serializeBinaryToWriter = function(message, writer) { 200 var f = undefined; 201 f = message.getBase(); 202 if (f != null) { 203 writer.writeMessage( 204 1, 205 f, 206 proto.permission.BasePermissions.serializeBinaryToWriter 207 ); 208 } 209 f = message.getRolesList(); 210 if (f.length > 0) { 211 writer.writeRepeatedString( 212 2, 213 f 214 ); 215 } 216 }; 217 218 219 /** 220 * optional BasePermissions Base = 1; 221 * @return {?proto.permission.BasePermissions} 222 */ 223 proto.permission.AccountPermissions.prototype.getBase = function() { 224 return /** @type{?proto.permission.BasePermissions} */ ( 225 jspb.Message.getWrapperField(this, proto.permission.BasePermissions, 1)); 226 }; 227 228 229 /** 230 * @param {?proto.permission.BasePermissions|undefined} value 231 * @return {!proto.permission.AccountPermissions} returns this 232 */ 233 proto.permission.AccountPermissions.prototype.setBase = function(value) { 234 return jspb.Message.setWrapperField(this, 1, value); 235 }; 236 237 238 /** 239 * Clears the message field making it undefined. 240 * @return {!proto.permission.AccountPermissions} returns this 241 */ 242 proto.permission.AccountPermissions.prototype.clearBase = function() { 243 return this.setBase(undefined); 244 }; 245 246 247 /** 248 * Returns whether this field is set. 249 * @return {boolean} 250 */ 251 proto.permission.AccountPermissions.prototype.hasBase = function() { 252 return jspb.Message.getField(this, 1) != null; 253 }; 254 255 256 /** 257 * repeated string Roles = 2; 258 * @return {!Array<string>} 259 */ 260 proto.permission.AccountPermissions.prototype.getRolesList = function() { 261 return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2)); 262 }; 263 264 265 /** 266 * @param {!Array<string>} value 267 * @return {!proto.permission.AccountPermissions} returns this 268 */ 269 proto.permission.AccountPermissions.prototype.setRolesList = function(value) { 270 return jspb.Message.setField(this, 2, value || []); 271 }; 272 273 274 /** 275 * @param {string} value 276 * @param {number=} opt_index 277 * @return {!proto.permission.AccountPermissions} returns this 278 */ 279 proto.permission.AccountPermissions.prototype.addRoles = function(value, opt_index) { 280 return jspb.Message.addToRepeatedField(this, 2, value, opt_index); 281 }; 282 283 284 /** 285 * Clears the list making it empty but non-null. 286 * @return {!proto.permission.AccountPermissions} returns this 287 */ 288 proto.permission.AccountPermissions.prototype.clearRolesList = function() { 289 return this.setRolesList([]); 290 }; 291 292 293 294 295 296 if (jspb.Message.GENERATE_TO_OBJECT) { 297 /** 298 * Creates an object representation of this proto. 299 * Field names that are reserved in JavaScript and will be renamed to pb_name. 300 * Optional fields that are not set will be set to undefined. 301 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. 302 * For the list of reserved names please see: 303 * net/proto2/compiler/js/internal/generator.cc#kKeyword. 304 * @param {boolean=} opt_includeInstance Deprecated. whether to include the 305 * JSPB instance for transitional soy proto support: 306 * http://goto/soy-param-migration 307 * @return {!Object} 308 */ 309 proto.permission.BasePermissions.prototype.toObject = function(opt_includeInstance) { 310 return proto.permission.BasePermissions.toObject(opt_includeInstance, this); 311 }; 312 313 314 /** 315 * Static version of the {@see toObject} method. 316 * @param {boolean|undefined} includeInstance Deprecated. Whether to include 317 * the JSPB instance for transitional soy proto support: 318 * http://goto/soy-param-migration 319 * @param {!proto.permission.BasePermissions} msg The msg instance to transform. 320 * @return {!Object} 321 * @suppress {unusedLocalVariables} f is only used for nested messages 322 */ 323 proto.permission.BasePermissions.toObject = function(includeInstance, msg) { 324 var f, obj = { 325 perms: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, 326 setbit: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f 327 }; 328 329 if (includeInstance) { 330 obj.$jspbMessageInstance = msg; 331 } 332 return obj; 333 }; 334 } 335 336 337 /** 338 * Deserializes binary data (in protobuf wire format). 339 * @param {jspb.ByteSource} bytes The bytes to deserialize. 340 * @return {!proto.permission.BasePermissions} 341 */ 342 proto.permission.BasePermissions.deserializeBinary = function(bytes) { 343 var reader = new jspb.BinaryReader(bytes); 344 var msg = new proto.permission.BasePermissions; 345 return proto.permission.BasePermissions.deserializeBinaryFromReader(msg, reader); 346 }; 347 348 349 /** 350 * Deserializes binary data (in protobuf wire format) from the 351 * given reader into the given message object. 352 * @param {!proto.permission.BasePermissions} msg The message object to deserialize into. 353 * @param {!jspb.BinaryReader} reader The BinaryReader to use. 354 * @return {!proto.permission.BasePermissions} 355 */ 356 proto.permission.BasePermissions.deserializeBinaryFromReader = function(msg, reader) { 357 while (reader.nextField()) { 358 if (reader.isEndGroup()) { 359 break; 360 } 361 var field = reader.getFieldNumber(); 362 switch (field) { 363 case 1: 364 var value = /** @type {number} */ (reader.readUint64()); 365 msg.setPerms(value); 366 break; 367 case 2: 368 var value = /** @type {number} */ (reader.readUint64()); 369 msg.setSetbit(value); 370 break; 371 default: 372 reader.skipField(); 373 break; 374 } 375 } 376 return msg; 377 }; 378 379 380 /** 381 * Serializes the message to binary data (in protobuf wire format). 382 * @return {!Uint8Array} 383 */ 384 proto.permission.BasePermissions.prototype.serializeBinary = function() { 385 var writer = new jspb.BinaryWriter(); 386 proto.permission.BasePermissions.serializeBinaryToWriter(this, writer); 387 return writer.getResultBuffer(); 388 }; 389 390 391 /** 392 * Serializes the given message to binary data (in protobuf wire 393 * format), writing to the given BinaryWriter. 394 * @param {!proto.permission.BasePermissions} message 395 * @param {!jspb.BinaryWriter} writer 396 * @suppress {unusedLocalVariables} f is only used for nested messages 397 */ 398 proto.permission.BasePermissions.serializeBinaryToWriter = function(message, writer) { 399 var f = undefined; 400 f = /** @type {number} */ (jspb.Message.getField(message, 1)); 401 if (f != null) { 402 writer.writeUint64( 403 1, 404 f 405 ); 406 } 407 f = /** @type {number} */ (jspb.Message.getField(message, 2)); 408 if (f != null) { 409 writer.writeUint64( 410 2, 411 f 412 ); 413 } 414 }; 415 416 417 /** 418 * optional uint64 Perms = 1; 419 * @return {number} 420 */ 421 proto.permission.BasePermissions.prototype.getPerms = function() { 422 return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); 423 }; 424 425 426 /** 427 * @param {number} value 428 * @return {!proto.permission.BasePermissions} returns this 429 */ 430 proto.permission.BasePermissions.prototype.setPerms = function(value) { 431 return jspb.Message.setField(this, 1, value); 432 }; 433 434 435 /** 436 * Clears the field making it undefined. 437 * @return {!proto.permission.BasePermissions} returns this 438 */ 439 proto.permission.BasePermissions.prototype.clearPerms = function() { 440 return jspb.Message.setField(this, 1, undefined); 441 }; 442 443 444 /** 445 * Returns whether this field is set. 446 * @return {boolean} 447 */ 448 proto.permission.BasePermissions.prototype.hasPerms = function() { 449 return jspb.Message.getField(this, 1) != null; 450 }; 451 452 453 /** 454 * optional uint64 SetBit = 2; 455 * @return {number} 456 */ 457 proto.permission.BasePermissions.prototype.getSetbit = function() { 458 return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); 459 }; 460 461 462 /** 463 * @param {number} value 464 * @return {!proto.permission.BasePermissions} returns this 465 */ 466 proto.permission.BasePermissions.prototype.setSetbit = function(value) { 467 return jspb.Message.setField(this, 2, value); 468 }; 469 470 471 /** 472 * Clears the field making it undefined. 473 * @return {!proto.permission.BasePermissions} returns this 474 */ 475 proto.permission.BasePermissions.prototype.clearSetbit = function() { 476 return jspb.Message.setField(this, 2, undefined); 477 }; 478 479 480 /** 481 * Returns whether this field is set. 482 * @return {boolean} 483 */ 484 proto.permission.BasePermissions.prototype.hasSetbit = function() { 485 return jspb.Message.getField(this, 2) != null; 486 }; 487 488 489 490 491 492 if (jspb.Message.GENERATE_TO_OBJECT) { 493 /** 494 * Creates an object representation of this proto. 495 * Field names that are reserved in JavaScript and will be renamed to pb_name. 496 * Optional fields that are not set will be set to undefined. 497 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. 498 * For the list of reserved names please see: 499 * net/proto2/compiler/js/internal/generator.cc#kKeyword. 500 * @param {boolean=} opt_includeInstance Deprecated. whether to include the 501 * JSPB instance for transitional soy proto support: 502 * http://goto/soy-param-migration 503 * @return {!Object} 504 */ 505 proto.permission.PermArgs.prototype.toObject = function(opt_includeInstance) { 506 return proto.permission.PermArgs.toObject(opt_includeInstance, this); 507 }; 508 509 510 /** 511 * Static version of the {@see toObject} method. 512 * @param {boolean|undefined} includeInstance Deprecated. Whether to include 513 * the JSPB instance for transitional soy proto support: 514 * http://goto/soy-param-migration 515 * @param {!proto.permission.PermArgs} msg The msg instance to transform. 516 * @return {!Object} 517 * @suppress {unusedLocalVariables} f is only used for nested messages 518 */ 519 proto.permission.PermArgs.toObject = function(includeInstance, msg) { 520 var f, obj = { 521 action: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, 522 target: msg.getTarget_asB64(), 523 permission: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, 524 role: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, 525 value: (f = jspb.Message.getBooleanField(msg, 5)) == null ? undefined : f 526 }; 527 528 if (includeInstance) { 529 obj.$jspbMessageInstance = msg; 530 } 531 return obj; 532 }; 533 } 534 535 536 /** 537 * Deserializes binary data (in protobuf wire format). 538 * @param {jspb.ByteSource} bytes The bytes to deserialize. 539 * @return {!proto.permission.PermArgs} 540 */ 541 proto.permission.PermArgs.deserializeBinary = function(bytes) { 542 var reader = new jspb.BinaryReader(bytes); 543 var msg = new proto.permission.PermArgs; 544 return proto.permission.PermArgs.deserializeBinaryFromReader(msg, reader); 545 }; 546 547 548 /** 549 * Deserializes binary data (in protobuf wire format) from the 550 * given reader into the given message object. 551 * @param {!proto.permission.PermArgs} msg The message object to deserialize into. 552 * @param {!jspb.BinaryReader} reader The BinaryReader to use. 553 * @return {!proto.permission.PermArgs} 554 */ 555 proto.permission.PermArgs.deserializeBinaryFromReader = function(msg, reader) { 556 while (reader.nextField()) { 557 if (reader.isEndGroup()) { 558 break; 559 } 560 var field = reader.getFieldNumber(); 561 switch (field) { 562 case 1: 563 var value = /** @type {number} */ (reader.readUint64()); 564 msg.setAction(value); 565 break; 566 case 2: 567 var value = /** @type {!Uint8Array} */ (reader.readBytes()); 568 msg.setTarget(value); 569 break; 570 case 3: 571 var value = /** @type {number} */ (reader.readUint64()); 572 msg.setPermission(value); 573 break; 574 case 4: 575 var value = /** @type {string} */ (reader.readString()); 576 msg.setRole(value); 577 break; 578 case 5: 579 var value = /** @type {boolean} */ (reader.readBool()); 580 msg.setValue(value); 581 break; 582 default: 583 reader.skipField(); 584 break; 585 } 586 } 587 return msg; 588 }; 589 590 591 /** 592 * Serializes the message to binary data (in protobuf wire format). 593 * @return {!Uint8Array} 594 */ 595 proto.permission.PermArgs.prototype.serializeBinary = function() { 596 var writer = new jspb.BinaryWriter(); 597 proto.permission.PermArgs.serializeBinaryToWriter(this, writer); 598 return writer.getResultBuffer(); 599 }; 600 601 602 /** 603 * Serializes the given message to binary data (in protobuf wire 604 * format), writing to the given BinaryWriter. 605 * @param {!proto.permission.PermArgs} message 606 * @param {!jspb.BinaryWriter} writer 607 * @suppress {unusedLocalVariables} f is only used for nested messages 608 */ 609 proto.permission.PermArgs.serializeBinaryToWriter = function(message, writer) { 610 var f = undefined; 611 f = /** @type {number} */ (jspb.Message.getField(message, 1)); 612 if (f != null) { 613 writer.writeUint64( 614 1, 615 f 616 ); 617 } 618 f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); 619 if (f != null) { 620 writer.writeBytes( 621 2, 622 f 623 ); 624 } 625 f = /** @type {number} */ (jspb.Message.getField(message, 3)); 626 if (f != null) { 627 writer.writeUint64( 628 3, 629 f 630 ); 631 } 632 f = /** @type {string} */ (jspb.Message.getField(message, 4)); 633 if (f != null) { 634 writer.writeString( 635 4, 636 f 637 ); 638 } 639 f = /** @type {boolean} */ (jspb.Message.getField(message, 5)); 640 if (f != null) { 641 writer.writeBool( 642 5, 643 f 644 ); 645 } 646 }; 647 648 649 /** 650 * optional uint64 Action = 1; 651 * @return {number} 652 */ 653 proto.permission.PermArgs.prototype.getAction = function() { 654 return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); 655 }; 656 657 658 /** 659 * @param {number} value 660 * @return {!proto.permission.PermArgs} returns this 661 */ 662 proto.permission.PermArgs.prototype.setAction = function(value) { 663 return jspb.Message.setField(this, 1, value); 664 }; 665 666 667 /** 668 * Clears the field making it undefined. 669 * @return {!proto.permission.PermArgs} returns this 670 */ 671 proto.permission.PermArgs.prototype.clearAction = function() { 672 return jspb.Message.setField(this, 1, undefined); 673 }; 674 675 676 /** 677 * Returns whether this field is set. 678 * @return {boolean} 679 */ 680 proto.permission.PermArgs.prototype.hasAction = function() { 681 return jspb.Message.getField(this, 1) != null; 682 }; 683 684 685 /** 686 * optional bytes Target = 2; 687 * @return {!(string|Uint8Array)} 688 */ 689 proto.permission.PermArgs.prototype.getTarget = function() { 690 return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); 691 }; 692 693 694 /** 695 * optional bytes Target = 2; 696 * This is a type-conversion wrapper around `getTarget()` 697 * @return {string} 698 */ 699 proto.permission.PermArgs.prototype.getTarget_asB64 = function() { 700 return /** @type {string} */ (jspb.Message.bytesAsB64( 701 this.getTarget())); 702 }; 703 704 705 /** 706 * optional bytes Target = 2; 707 * Note that Uint8Array is not supported on all browsers. 708 * @see http://caniuse.com/Uint8Array 709 * This is a type-conversion wrapper around `getTarget()` 710 * @return {!Uint8Array} 711 */ 712 proto.permission.PermArgs.prototype.getTarget_asU8 = function() { 713 return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( 714 this.getTarget())); 715 }; 716 717 718 /** 719 * @param {!(string|Uint8Array)} value 720 * @return {!proto.permission.PermArgs} returns this 721 */ 722 proto.permission.PermArgs.prototype.setTarget = function(value) { 723 return jspb.Message.setField(this, 2, value); 724 }; 725 726 727 /** 728 * Clears the field making it undefined. 729 * @return {!proto.permission.PermArgs} returns this 730 */ 731 proto.permission.PermArgs.prototype.clearTarget = function() { 732 return jspb.Message.setField(this, 2, undefined); 733 }; 734 735 736 /** 737 * Returns whether this field is set. 738 * @return {boolean} 739 */ 740 proto.permission.PermArgs.prototype.hasTarget = function() { 741 return jspb.Message.getField(this, 2) != null; 742 }; 743 744 745 /** 746 * optional uint64 Permission = 3; 747 * @return {number} 748 */ 749 proto.permission.PermArgs.prototype.getPermission = function() { 750 return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); 751 }; 752 753 754 /** 755 * @param {number} value 756 * @return {!proto.permission.PermArgs} returns this 757 */ 758 proto.permission.PermArgs.prototype.setPermission = function(value) { 759 return jspb.Message.setField(this, 3, value); 760 }; 761 762 763 /** 764 * Clears the field making it undefined. 765 * @return {!proto.permission.PermArgs} returns this 766 */ 767 proto.permission.PermArgs.prototype.clearPermission = function() { 768 return jspb.Message.setField(this, 3, undefined); 769 }; 770 771 772 /** 773 * Returns whether this field is set. 774 * @return {boolean} 775 */ 776 proto.permission.PermArgs.prototype.hasPermission = function() { 777 return jspb.Message.getField(this, 3) != null; 778 }; 779 780 781 /** 782 * optional string Role = 4; 783 * @return {string} 784 */ 785 proto.permission.PermArgs.prototype.getRole = function() { 786 return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); 787 }; 788 789 790 /** 791 * @param {string} value 792 * @return {!proto.permission.PermArgs} returns this 793 */ 794 proto.permission.PermArgs.prototype.setRole = function(value) { 795 return jspb.Message.setField(this, 4, value); 796 }; 797 798 799 /** 800 * Clears the field making it undefined. 801 * @return {!proto.permission.PermArgs} returns this 802 */ 803 proto.permission.PermArgs.prototype.clearRole = function() { 804 return jspb.Message.setField(this, 4, undefined); 805 }; 806 807 808 /** 809 * Returns whether this field is set. 810 * @return {boolean} 811 */ 812 proto.permission.PermArgs.prototype.hasRole = function() { 813 return jspb.Message.getField(this, 4) != null; 814 }; 815 816 817 /** 818 * optional bool Value = 5; 819 * @return {boolean} 820 */ 821 proto.permission.PermArgs.prototype.getValue = function() { 822 return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); 823 }; 824 825 826 /** 827 * @param {boolean} value 828 * @return {!proto.permission.PermArgs} returns this 829 */ 830 proto.permission.PermArgs.prototype.setValue = function(value) { 831 return jspb.Message.setField(this, 5, value); 832 }; 833 834 835 /** 836 * Clears the field making it undefined. 837 * @return {!proto.permission.PermArgs} returns this 838 */ 839 proto.permission.PermArgs.prototype.clearValue = function() { 840 return jspb.Message.setField(this, 5, undefined); 841 }; 842 843 844 /** 845 * Returns whether this field is set. 846 * @return {boolean} 847 */ 848 proto.permission.PermArgs.prototype.hasValue = function() { 849 return jspb.Message.getField(this, 5) != null; 850 }; 851 852 853 goog.object.extend(exports, proto.permission);