agones.dev/agones@v1.53.0/sdks/nodejs/lib/google/api/resource_pb.js (about) 1 // source: google/api/resource.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 google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); 19 goog.object.extend(proto, google_protobuf_descriptor_pb); 20 goog.exportSymbol('proto.google.api.ResourceDescriptor', null, global); 21 goog.exportSymbol('proto.google.api.ResourceDescriptor.History', null, global); 22 goog.exportSymbol('proto.google.api.ResourceDescriptor.Style', null, global); 23 goog.exportSymbol('proto.google.api.ResourceReference', null, global); 24 goog.exportSymbol('proto.google.api.resource', null, global); 25 goog.exportSymbol('proto.google.api.resourceDefinitionList', null, global); 26 goog.exportSymbol('proto.google.api.resourceReference', null, global); 27 /** 28 * Generated by JsPbCodeGenerator. 29 * @param {Array=} opt_data Optional initial data array, typically from a 30 * server response, or constructed directly in Javascript. The array is used 31 * in place and becomes part of the constructed object. It is not cloned. 32 * If no data is provided, the constructed object will be empty, but still 33 * valid. 34 * @extends {jspb.Message} 35 * @constructor 36 */ 37 proto.google.api.ResourceDescriptor = function(opt_data) { 38 jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.ResourceDescriptor.repeatedFields_, null); 39 }; 40 goog.inherits(proto.google.api.ResourceDescriptor, jspb.Message); 41 if (goog.DEBUG && !COMPILED) { 42 /** 43 * @public 44 * @override 45 */ 46 proto.google.api.ResourceDescriptor.displayName = 'proto.google.api.ResourceDescriptor'; 47 } 48 /** 49 * Generated by JsPbCodeGenerator. 50 * @param {Array=} opt_data Optional initial data array, typically from a 51 * server response, or constructed directly in Javascript. The array is used 52 * in place and becomes part of the constructed object. It is not cloned. 53 * If no data is provided, the constructed object will be empty, but still 54 * valid. 55 * @extends {jspb.Message} 56 * @constructor 57 */ 58 proto.google.api.ResourceReference = function(opt_data) { 59 jspb.Message.initialize(this, opt_data, 0, -1, null, null); 60 }; 61 goog.inherits(proto.google.api.ResourceReference, jspb.Message); 62 if (goog.DEBUG && !COMPILED) { 63 /** 64 * @public 65 * @override 66 */ 67 proto.google.api.ResourceReference.displayName = 'proto.google.api.ResourceReference'; 68 } 69 70 /** 71 * List of repeated fields within this message type. 72 * @private {!Array<number>} 73 * @const 74 */ 75 proto.google.api.ResourceDescriptor.repeatedFields_ = [2,10]; 76 77 78 79 if (jspb.Message.GENERATE_TO_OBJECT) { 80 /** 81 * Creates an object representation of this proto. 82 * Field names that are reserved in JavaScript and will be renamed to pb_name. 83 * Optional fields that are not set will be set to undefined. 84 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. 85 * For the list of reserved names please see: 86 * net/proto2/compiler/js/internal/generator.cc#kKeyword. 87 * @param {boolean=} opt_includeInstance Deprecated. whether to include the 88 * JSPB instance for transitional soy proto support: 89 * http://goto/soy-param-migration 90 * @return {!Object} 91 */ 92 proto.google.api.ResourceDescriptor.prototype.toObject = function(opt_includeInstance) { 93 return proto.google.api.ResourceDescriptor.toObject(opt_includeInstance, this); 94 }; 95 96 97 /** 98 * Static version of the {@see toObject} method. 99 * @param {boolean|undefined} includeInstance Deprecated. Whether to include 100 * the JSPB instance for transitional soy proto support: 101 * http://goto/soy-param-migration 102 * @param {!proto.google.api.ResourceDescriptor} msg The msg instance to transform. 103 * @return {!Object} 104 * @suppress {unusedLocalVariables} f is only used for nested messages 105 */ 106 proto.google.api.ResourceDescriptor.toObject = function(includeInstance, msg) { 107 var f, obj = { 108 type: jspb.Message.getFieldWithDefault(msg, 1, ""), 109 patternList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, 110 nameField: jspb.Message.getFieldWithDefault(msg, 3, ""), 111 history: jspb.Message.getFieldWithDefault(msg, 4, 0), 112 plural: jspb.Message.getFieldWithDefault(msg, 5, ""), 113 singular: jspb.Message.getFieldWithDefault(msg, 6, ""), 114 styleList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f 115 }; 116 117 if (includeInstance) { 118 obj.$jspbMessageInstance = msg; 119 } 120 return obj; 121 }; 122 } 123 124 125 /** 126 * Deserializes binary data (in protobuf wire format). 127 * @param {jspb.ByteSource} bytes The bytes to deserialize. 128 * @return {!proto.google.api.ResourceDescriptor} 129 */ 130 proto.google.api.ResourceDescriptor.deserializeBinary = function(bytes) { 131 var reader = new jspb.BinaryReader(bytes); 132 var msg = new proto.google.api.ResourceDescriptor; 133 return proto.google.api.ResourceDescriptor.deserializeBinaryFromReader(msg, reader); 134 }; 135 136 137 /** 138 * Deserializes binary data (in protobuf wire format) from the 139 * given reader into the given message object. 140 * @param {!proto.google.api.ResourceDescriptor} msg The message object to deserialize into. 141 * @param {!jspb.BinaryReader} reader The BinaryReader to use. 142 * @return {!proto.google.api.ResourceDescriptor} 143 */ 144 proto.google.api.ResourceDescriptor.deserializeBinaryFromReader = function(msg, reader) { 145 while (reader.nextField()) { 146 if (reader.isEndGroup()) { 147 break; 148 } 149 var field = reader.getFieldNumber(); 150 switch (field) { 151 case 1: 152 var value = /** @type {string} */ (reader.readString()); 153 msg.setType(value); 154 break; 155 case 2: 156 var value = /** @type {string} */ (reader.readString()); 157 msg.addPattern(value); 158 break; 159 case 3: 160 var value = /** @type {string} */ (reader.readString()); 161 msg.setNameField(value); 162 break; 163 case 4: 164 var value = /** @type {!proto.google.api.ResourceDescriptor.History} */ (reader.readEnum()); 165 msg.setHistory(value); 166 break; 167 case 5: 168 var value = /** @type {string} */ (reader.readString()); 169 msg.setPlural(value); 170 break; 171 case 6: 172 var value = /** @type {string} */ (reader.readString()); 173 msg.setSingular(value); 174 break; 175 case 10: 176 var values = /** @type {!Array<!proto.google.api.ResourceDescriptor.Style>} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); 177 for (var i = 0; i < values.length; i++) { 178 msg.addStyle(values[i]); 179 } 180 break; 181 default: 182 reader.skipField(); 183 break; 184 } 185 } 186 return msg; 187 }; 188 189 190 /** 191 * Serializes the message to binary data (in protobuf wire format). 192 * @return {!Uint8Array} 193 */ 194 proto.google.api.ResourceDescriptor.prototype.serializeBinary = function() { 195 var writer = new jspb.BinaryWriter(); 196 proto.google.api.ResourceDescriptor.serializeBinaryToWriter(this, writer); 197 return writer.getResultBuffer(); 198 }; 199 200 201 /** 202 * Serializes the given message to binary data (in protobuf wire 203 * format), writing to the given BinaryWriter. 204 * @param {!proto.google.api.ResourceDescriptor} message 205 * @param {!jspb.BinaryWriter} writer 206 * @suppress {unusedLocalVariables} f is only used for nested messages 207 */ 208 proto.google.api.ResourceDescriptor.serializeBinaryToWriter = function(message, writer) { 209 var f = undefined; 210 f = message.getType(); 211 if (f.length > 0) { 212 writer.writeString( 213 1, 214 f 215 ); 216 } 217 f = message.getPatternList(); 218 if (f.length > 0) { 219 writer.writeRepeatedString( 220 2, 221 f 222 ); 223 } 224 f = message.getNameField(); 225 if (f.length > 0) { 226 writer.writeString( 227 3, 228 f 229 ); 230 } 231 f = message.getHistory(); 232 if (f !== 0.0) { 233 writer.writeEnum( 234 4, 235 f 236 ); 237 } 238 f = message.getPlural(); 239 if (f.length > 0) { 240 writer.writeString( 241 5, 242 f 243 ); 244 } 245 f = message.getSingular(); 246 if (f.length > 0) { 247 writer.writeString( 248 6, 249 f 250 ); 251 } 252 f = message.getStyleList(); 253 if (f.length > 0) { 254 writer.writePackedEnum( 255 10, 256 f 257 ); 258 } 259 }; 260 261 262 /** 263 * @enum {number} 264 */ 265 proto.google.api.ResourceDescriptor.History = { 266 HISTORY_UNSPECIFIED: 0, 267 ORIGINALLY_SINGLE_PATTERN: 1, 268 FUTURE_MULTI_PATTERN: 2 269 }; 270 271 /** 272 * @enum {number} 273 */ 274 proto.google.api.ResourceDescriptor.Style = { 275 STYLE_UNSPECIFIED: 0, 276 DECLARATIVE_FRIENDLY: 1 277 }; 278 279 /** 280 * optional string type = 1; 281 * @return {string} 282 */ 283 proto.google.api.ResourceDescriptor.prototype.getType = function() { 284 return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); 285 }; 286 287 288 /** 289 * @param {string} value 290 * @return {!proto.google.api.ResourceDescriptor} returns this 291 */ 292 proto.google.api.ResourceDescriptor.prototype.setType = function(value) { 293 return jspb.Message.setProto3StringField(this, 1, value); 294 }; 295 296 297 /** 298 * repeated string pattern = 2; 299 * @return {!Array<string>} 300 */ 301 proto.google.api.ResourceDescriptor.prototype.getPatternList = function() { 302 return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2)); 303 }; 304 305 306 /** 307 * @param {!Array<string>} value 308 * @return {!proto.google.api.ResourceDescriptor} returns this 309 */ 310 proto.google.api.ResourceDescriptor.prototype.setPatternList = function(value) { 311 return jspb.Message.setField(this, 2, value || []); 312 }; 313 314 315 /** 316 * @param {string} value 317 * @param {number=} opt_index 318 * @return {!proto.google.api.ResourceDescriptor} returns this 319 */ 320 proto.google.api.ResourceDescriptor.prototype.addPattern = function(value, opt_index) { 321 return jspb.Message.addToRepeatedField(this, 2, value, opt_index); 322 }; 323 324 325 /** 326 * Clears the list making it empty but non-null. 327 * @return {!proto.google.api.ResourceDescriptor} returns this 328 */ 329 proto.google.api.ResourceDescriptor.prototype.clearPatternList = function() { 330 return this.setPatternList([]); 331 }; 332 333 334 /** 335 * optional string name_field = 3; 336 * @return {string} 337 */ 338 proto.google.api.ResourceDescriptor.prototype.getNameField = function() { 339 return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); 340 }; 341 342 343 /** 344 * @param {string} value 345 * @return {!proto.google.api.ResourceDescriptor} returns this 346 */ 347 proto.google.api.ResourceDescriptor.prototype.setNameField = function(value) { 348 return jspb.Message.setProto3StringField(this, 3, value); 349 }; 350 351 352 /** 353 * optional History history = 4; 354 * @return {!proto.google.api.ResourceDescriptor.History} 355 */ 356 proto.google.api.ResourceDescriptor.prototype.getHistory = function() { 357 return /** @type {!proto.google.api.ResourceDescriptor.History} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); 358 }; 359 360 361 /** 362 * @param {!proto.google.api.ResourceDescriptor.History} value 363 * @return {!proto.google.api.ResourceDescriptor} returns this 364 */ 365 proto.google.api.ResourceDescriptor.prototype.setHistory = function(value) { 366 return jspb.Message.setProto3EnumField(this, 4, value); 367 }; 368 369 370 /** 371 * optional string plural = 5; 372 * @return {string} 373 */ 374 proto.google.api.ResourceDescriptor.prototype.getPlural = function() { 375 return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); 376 }; 377 378 379 /** 380 * @param {string} value 381 * @return {!proto.google.api.ResourceDescriptor} returns this 382 */ 383 proto.google.api.ResourceDescriptor.prototype.setPlural = function(value) { 384 return jspb.Message.setProto3StringField(this, 5, value); 385 }; 386 387 388 /** 389 * optional string singular = 6; 390 * @return {string} 391 */ 392 proto.google.api.ResourceDescriptor.prototype.getSingular = function() { 393 return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); 394 }; 395 396 397 /** 398 * @param {string} value 399 * @return {!proto.google.api.ResourceDescriptor} returns this 400 */ 401 proto.google.api.ResourceDescriptor.prototype.setSingular = function(value) { 402 return jspb.Message.setProto3StringField(this, 6, value); 403 }; 404 405 406 /** 407 * repeated Style style = 10; 408 * @return {!Array<!proto.google.api.ResourceDescriptor.Style>} 409 */ 410 proto.google.api.ResourceDescriptor.prototype.getStyleList = function() { 411 return /** @type {!Array<!proto.google.api.ResourceDescriptor.Style>} */ (jspb.Message.getRepeatedField(this, 10)); 412 }; 413 414 415 /** 416 * @param {!Array<!proto.google.api.ResourceDescriptor.Style>} value 417 * @return {!proto.google.api.ResourceDescriptor} returns this 418 */ 419 proto.google.api.ResourceDescriptor.prototype.setStyleList = function(value) { 420 return jspb.Message.setField(this, 10, value || []); 421 }; 422 423 424 /** 425 * @param {!proto.google.api.ResourceDescriptor.Style} value 426 * @param {number=} opt_index 427 * @return {!proto.google.api.ResourceDescriptor} returns this 428 */ 429 proto.google.api.ResourceDescriptor.prototype.addStyle = function(value, opt_index) { 430 return jspb.Message.addToRepeatedField(this, 10, value, opt_index); 431 }; 432 433 434 /** 435 * Clears the list making it empty but non-null. 436 * @return {!proto.google.api.ResourceDescriptor} returns this 437 */ 438 proto.google.api.ResourceDescriptor.prototype.clearStyleList = function() { 439 return this.setStyleList([]); 440 }; 441 442 443 444 445 446 if (jspb.Message.GENERATE_TO_OBJECT) { 447 /** 448 * Creates an object representation of this proto. 449 * Field names that are reserved in JavaScript and will be renamed to pb_name. 450 * Optional fields that are not set will be set to undefined. 451 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. 452 * For the list of reserved names please see: 453 * net/proto2/compiler/js/internal/generator.cc#kKeyword. 454 * @param {boolean=} opt_includeInstance Deprecated. whether to include the 455 * JSPB instance for transitional soy proto support: 456 * http://goto/soy-param-migration 457 * @return {!Object} 458 */ 459 proto.google.api.ResourceReference.prototype.toObject = function(opt_includeInstance) { 460 return proto.google.api.ResourceReference.toObject(opt_includeInstance, this); 461 }; 462 463 464 /** 465 * Static version of the {@see toObject} method. 466 * @param {boolean|undefined} includeInstance Deprecated. Whether to include 467 * the JSPB instance for transitional soy proto support: 468 * http://goto/soy-param-migration 469 * @param {!proto.google.api.ResourceReference} msg The msg instance to transform. 470 * @return {!Object} 471 * @suppress {unusedLocalVariables} f is only used for nested messages 472 */ 473 proto.google.api.ResourceReference.toObject = function(includeInstance, msg) { 474 var f, obj = { 475 type: jspb.Message.getFieldWithDefault(msg, 1, ""), 476 childType: jspb.Message.getFieldWithDefault(msg, 2, "") 477 }; 478 479 if (includeInstance) { 480 obj.$jspbMessageInstance = msg; 481 } 482 return obj; 483 }; 484 } 485 486 487 /** 488 * Deserializes binary data (in protobuf wire format). 489 * @param {jspb.ByteSource} bytes The bytes to deserialize. 490 * @return {!proto.google.api.ResourceReference} 491 */ 492 proto.google.api.ResourceReference.deserializeBinary = function(bytes) { 493 var reader = new jspb.BinaryReader(bytes); 494 var msg = new proto.google.api.ResourceReference; 495 return proto.google.api.ResourceReference.deserializeBinaryFromReader(msg, reader); 496 }; 497 498 499 /** 500 * Deserializes binary data (in protobuf wire format) from the 501 * given reader into the given message object. 502 * @param {!proto.google.api.ResourceReference} msg The message object to deserialize into. 503 * @param {!jspb.BinaryReader} reader The BinaryReader to use. 504 * @return {!proto.google.api.ResourceReference} 505 */ 506 proto.google.api.ResourceReference.deserializeBinaryFromReader = function(msg, reader) { 507 while (reader.nextField()) { 508 if (reader.isEndGroup()) { 509 break; 510 } 511 var field = reader.getFieldNumber(); 512 switch (field) { 513 case 1: 514 var value = /** @type {string} */ (reader.readString()); 515 msg.setType(value); 516 break; 517 case 2: 518 var value = /** @type {string} */ (reader.readString()); 519 msg.setChildType(value); 520 break; 521 default: 522 reader.skipField(); 523 break; 524 } 525 } 526 return msg; 527 }; 528 529 530 /** 531 * Serializes the message to binary data (in protobuf wire format). 532 * @return {!Uint8Array} 533 */ 534 proto.google.api.ResourceReference.prototype.serializeBinary = function() { 535 var writer = new jspb.BinaryWriter(); 536 proto.google.api.ResourceReference.serializeBinaryToWriter(this, writer); 537 return writer.getResultBuffer(); 538 }; 539 540 541 /** 542 * Serializes the given message to binary data (in protobuf wire 543 * format), writing to the given BinaryWriter. 544 * @param {!proto.google.api.ResourceReference} message 545 * @param {!jspb.BinaryWriter} writer 546 * @suppress {unusedLocalVariables} f is only used for nested messages 547 */ 548 proto.google.api.ResourceReference.serializeBinaryToWriter = function(message, writer) { 549 var f = undefined; 550 f = message.getType(); 551 if (f.length > 0) { 552 writer.writeString( 553 1, 554 f 555 ); 556 } 557 f = message.getChildType(); 558 if (f.length > 0) { 559 writer.writeString( 560 2, 561 f 562 ); 563 } 564 }; 565 566 567 /** 568 * optional string type = 1; 569 * @return {string} 570 */ 571 proto.google.api.ResourceReference.prototype.getType = function() { 572 return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); 573 }; 574 575 576 /** 577 * @param {string} value 578 * @return {!proto.google.api.ResourceReference} returns this 579 */ 580 proto.google.api.ResourceReference.prototype.setType = function(value) { 581 return jspb.Message.setProto3StringField(this, 1, value); 582 }; 583 584 585 /** 586 * optional string child_type = 2; 587 * @return {string} 588 */ 589 proto.google.api.ResourceReference.prototype.getChildType = function() { 590 return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); 591 }; 592 593 594 /** 595 * @param {string} value 596 * @return {!proto.google.api.ResourceReference} returns this 597 */ 598 proto.google.api.ResourceReference.prototype.setChildType = function(value) { 599 return jspb.Message.setProto3StringField(this, 2, value); 600 }; 601 602 603 604 /** 605 * A tuple of {field number, class constructor} for the extension 606 * field named `resourceReference`. 607 * @type {!jspb.ExtensionFieldInfo<!proto.google.api.ResourceReference>} 608 */ 609 proto.google.api.resourceReference = new jspb.ExtensionFieldInfo( 610 1055, 611 {resourceReference: 0}, 612 proto.google.api.ResourceReference, 613 /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( 614 proto.google.api.ResourceReference.toObject), 615 0); 616 617 google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[1055] = new jspb.ExtensionFieldBinaryInfo( 618 proto.google.api.resourceReference, 619 jspb.BinaryReader.prototype.readMessage, 620 jspb.BinaryWriter.prototype.writeMessage, 621 proto.google.api.ResourceReference.serializeBinaryToWriter, 622 proto.google.api.ResourceReference.deserializeBinaryFromReader, 623 false); 624 // This registers the extension field with the extended class, so that 625 // toObject() will function correctly. 626 google_protobuf_descriptor_pb.FieldOptions.extensions[1055] = proto.google.api.resourceReference; 627 628 629 /** 630 * A tuple of {field number, class constructor} for the extension 631 * field named `resourceDefinitionList`. 632 * @type {!jspb.ExtensionFieldInfo<!Array<!proto.google.api.ResourceDescriptor>>} 633 */ 634 proto.google.api.resourceDefinitionList = new jspb.ExtensionFieldInfo( 635 1053, 636 {resourceDefinitionList: 0}, 637 proto.google.api.ResourceDescriptor, 638 /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( 639 proto.google.api.ResourceDescriptor.toObject), 640 1); 641 642 google_protobuf_descriptor_pb.FileOptions.extensionsBinary[1053] = new jspb.ExtensionFieldBinaryInfo( 643 proto.google.api.resourceDefinitionList, 644 jspb.BinaryReader.prototype.readMessage, 645 jspb.BinaryWriter.prototype.writeRepeatedMessage, 646 proto.google.api.ResourceDescriptor.serializeBinaryToWriter, 647 proto.google.api.ResourceDescriptor.deserializeBinaryFromReader, 648 false); 649 // This registers the extension field with the extended class, so that 650 // toObject() will function correctly. 651 google_protobuf_descriptor_pb.FileOptions.extensions[1053] = proto.google.api.resourceDefinitionList; 652 653 654 /** 655 * A tuple of {field number, class constructor} for the extension 656 * field named `resource`. 657 * @type {!jspb.ExtensionFieldInfo<!proto.google.api.ResourceDescriptor>} 658 */ 659 proto.google.api.resource = new jspb.ExtensionFieldInfo( 660 1053, 661 {resource: 0}, 662 proto.google.api.ResourceDescriptor, 663 /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( 664 proto.google.api.ResourceDescriptor.toObject), 665 0); 666 667 google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[1053] = new jspb.ExtensionFieldBinaryInfo( 668 proto.google.api.resource, 669 jspb.BinaryReader.prototype.readMessage, 670 jspb.BinaryWriter.prototype.writeMessage, 671 proto.google.api.ResourceDescriptor.serializeBinaryToWriter, 672 proto.google.api.ResourceDescriptor.deserializeBinaryFromReader, 673 false); 674 // This registers the extension field with the extended class, so that 675 // toObject() will function correctly. 676 google_protobuf_descriptor_pb.MessageOptions.extensions[1053] = proto.google.api.resource; 677 678 goog.object.extend(exports, proto.google.api);