agones.dev/agones@v1.53.0/sdks/nodejs/lib/beta/google/api/http_pb.js (about) 1 // Copyright 2024 Google LLC All Rights Reserved. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 // This code was autogenerated. Do not edit directly. 16 // source: google/api/http.proto 17 /** 18 * @fileoverview 19 * @enhanceable 20 * @suppress {missingRequire} reports error on implicit type usages. 21 * @suppress {messageConventions} JS Compiler reports an error if a variable or 22 * field starts with 'MSG_' and isn't a translatable message. 23 * @public 24 */ 25 // GENERATED CODE -- DO NOT EDIT! 26 /* eslint-disable */ 27 // @ts-nocheck 28 29 var jspb = require('google-protobuf'); 30 var goog = jspb; 31 var global = Function('return this')(); 32 33 goog.exportSymbol('proto.google.api.CustomHttpPattern', null, global); 34 goog.exportSymbol('proto.google.api.Http', null, global); 35 goog.exportSymbol('proto.google.api.HttpRule', null, global); 36 goog.exportSymbol('proto.google.api.HttpRule.PatternCase', null, global); 37 /** 38 * Generated by JsPbCodeGenerator. 39 * @param {Array=} opt_data Optional initial data array, typically from a 40 * server response, or constructed directly in Javascript. The array is used 41 * in place and becomes part of the constructed object. It is not cloned. 42 * If no data is provided, the constructed object will be empty, but still 43 * valid. 44 * @extends {jspb.Message} 45 * @constructor 46 */ 47 proto.google.api.Http = function(opt_data) { 48 jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Http.repeatedFields_, null); 49 }; 50 goog.inherits(proto.google.api.Http, jspb.Message); 51 if (goog.DEBUG && !COMPILED) { 52 /** 53 * @public 54 * @override 55 */ 56 proto.google.api.Http.displayName = 'proto.google.api.Http'; 57 } 58 /** 59 * Generated by JsPbCodeGenerator. 60 * @param {Array=} opt_data Optional initial data array, typically from a 61 * server response, or constructed directly in Javascript. The array is used 62 * in place and becomes part of the constructed object. It is not cloned. 63 * If no data is provided, the constructed object will be empty, but still 64 * valid. 65 * @extends {jspb.Message} 66 * @constructor 67 */ 68 proto.google.api.HttpRule = function(opt_data) { 69 jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.HttpRule.repeatedFields_, proto.google.api.HttpRule.oneofGroups_); 70 }; 71 goog.inherits(proto.google.api.HttpRule, jspb.Message); 72 if (goog.DEBUG && !COMPILED) { 73 /** 74 * @public 75 * @override 76 */ 77 proto.google.api.HttpRule.displayName = 'proto.google.api.HttpRule'; 78 } 79 /** 80 * Generated by JsPbCodeGenerator. 81 * @param {Array=} opt_data Optional initial data array, typically from a 82 * server response, or constructed directly in Javascript. The array is used 83 * in place and becomes part of the constructed object. It is not cloned. 84 * If no data is provided, the constructed object will be empty, but still 85 * valid. 86 * @extends {jspb.Message} 87 * @constructor 88 */ 89 proto.google.api.CustomHttpPattern = function(opt_data) { 90 jspb.Message.initialize(this, opt_data, 0, -1, null, null); 91 }; 92 goog.inherits(proto.google.api.CustomHttpPattern, jspb.Message); 93 if (goog.DEBUG && !COMPILED) { 94 /** 95 * @public 96 * @override 97 */ 98 proto.google.api.CustomHttpPattern.displayName = 'proto.google.api.CustomHttpPattern'; 99 } 100 101 /** 102 * List of repeated fields within this message type. 103 * @private {!Array<number>} 104 * @const 105 */ 106 proto.google.api.Http.repeatedFields_ = [1]; 107 108 109 110 if (jspb.Message.GENERATE_TO_OBJECT) { 111 /** 112 * Creates an object representation of this proto. 113 * Field names that are reserved in JavaScript and will be renamed to pb_name. 114 * Optional fields that are not set will be set to undefined. 115 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. 116 * For the list of reserved names please see: 117 * net/proto2/compiler/js/internal/generator.cc#kKeyword. 118 * @param {boolean=} opt_includeInstance Deprecated. whether to include the 119 * JSPB instance for transitional soy proto support: 120 * http://goto/soy-param-migration 121 * @return {!Object} 122 */ 123 proto.google.api.Http.prototype.toObject = function(opt_includeInstance) { 124 return proto.google.api.Http.toObject(opt_includeInstance, this); 125 }; 126 127 128 /** 129 * Static version of the {@see toObject} method. 130 * @param {boolean|undefined} includeInstance Deprecated. Whether to include 131 * the JSPB instance for transitional soy proto support: 132 * http://goto/soy-param-migration 133 * @param {!proto.google.api.Http} msg The msg instance to transform. 134 * @return {!Object} 135 * @suppress {unusedLocalVariables} f is only used for nested messages 136 */ 137 proto.google.api.Http.toObject = function(includeInstance, msg) { 138 var f, obj = { 139 rulesList: jspb.Message.toObjectList(msg.getRulesList(), 140 proto.google.api.HttpRule.toObject, includeInstance), 141 fullyDecodeReservedExpansion: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) 142 }; 143 144 if (includeInstance) { 145 obj.$jspbMessageInstance = msg; 146 } 147 return obj; 148 }; 149 } 150 151 152 /** 153 * Deserializes binary data (in protobuf wire format). 154 * @param {jspb.ByteSource} bytes The bytes to deserialize. 155 * @return {!proto.google.api.Http} 156 */ 157 proto.google.api.Http.deserializeBinary = function(bytes) { 158 var reader = new jspb.BinaryReader(bytes); 159 var msg = new proto.google.api.Http; 160 return proto.google.api.Http.deserializeBinaryFromReader(msg, reader); 161 }; 162 163 164 /** 165 * Deserializes binary data (in protobuf wire format) from the 166 * given reader into the given message object. 167 * @param {!proto.google.api.Http} msg The message object to deserialize into. 168 * @param {!jspb.BinaryReader} reader The BinaryReader to use. 169 * @return {!proto.google.api.Http} 170 */ 171 proto.google.api.Http.deserializeBinaryFromReader = function(msg, reader) { 172 while (reader.nextField()) { 173 if (reader.isEndGroup()) { 174 break; 175 } 176 var field = reader.getFieldNumber(); 177 switch (field) { 178 case 1: 179 var value = new proto.google.api.HttpRule; 180 reader.readMessage(value,proto.google.api.HttpRule.deserializeBinaryFromReader); 181 msg.addRules(value); 182 break; 183 case 2: 184 var value = /** @type {boolean} */ (reader.readBool()); 185 msg.setFullyDecodeReservedExpansion(value); 186 break; 187 default: 188 reader.skipField(); 189 break; 190 } 191 } 192 return msg; 193 }; 194 195 196 /** 197 * Serializes the message to binary data (in protobuf wire format). 198 * @return {!Uint8Array} 199 */ 200 proto.google.api.Http.prototype.serializeBinary = function() { 201 var writer = new jspb.BinaryWriter(); 202 proto.google.api.Http.serializeBinaryToWriter(this, writer); 203 return writer.getResultBuffer(); 204 }; 205 206 207 /** 208 * Serializes the given message to binary data (in protobuf wire 209 * format), writing to the given BinaryWriter. 210 * @param {!proto.google.api.Http} message 211 * @param {!jspb.BinaryWriter} writer 212 * @suppress {unusedLocalVariables} f is only used for nested messages 213 */ 214 proto.google.api.Http.serializeBinaryToWriter = function(message, writer) { 215 var f = undefined; 216 f = message.getRulesList(); 217 if (f.length > 0) { 218 writer.writeRepeatedMessage( 219 1, 220 f, 221 proto.google.api.HttpRule.serializeBinaryToWriter 222 ); 223 } 224 f = message.getFullyDecodeReservedExpansion(); 225 if (f) { 226 writer.writeBool( 227 2, 228 f 229 ); 230 } 231 }; 232 233 234 /** 235 * repeated HttpRule rules = 1; 236 * @return {!Array<!proto.google.api.HttpRule>} 237 */ 238 proto.google.api.Http.prototype.getRulesList = function() { 239 return /** @type{!Array<!proto.google.api.HttpRule>} */ ( 240 jspb.Message.getRepeatedWrapperField(this, proto.google.api.HttpRule, 1)); 241 }; 242 243 244 /** 245 * @param {!Array<!proto.google.api.HttpRule>} value 246 * @return {!proto.google.api.Http} returns this 247 */ 248 proto.google.api.Http.prototype.setRulesList = function(value) { 249 return jspb.Message.setRepeatedWrapperField(this, 1, value); 250 }; 251 252 253 /** 254 * @param {!proto.google.api.HttpRule=} opt_value 255 * @param {number=} opt_index 256 * @return {!proto.google.api.HttpRule} 257 */ 258 proto.google.api.Http.prototype.addRules = function(opt_value, opt_index) { 259 return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.HttpRule, opt_index); 260 }; 261 262 263 /** 264 * Clears the list making it empty but non-null. 265 * @return {!proto.google.api.Http} returns this 266 */ 267 proto.google.api.Http.prototype.clearRulesList = function() { 268 return this.setRulesList([]); 269 }; 270 271 272 /** 273 * optional bool fully_decode_reserved_expansion = 2; 274 * @return {boolean} 275 */ 276 proto.google.api.Http.prototype.getFullyDecodeReservedExpansion = function() { 277 return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); 278 }; 279 280 281 /** 282 * @param {boolean} value 283 * @return {!proto.google.api.Http} returns this 284 */ 285 proto.google.api.Http.prototype.setFullyDecodeReservedExpansion = function(value) { 286 return jspb.Message.setProto3BooleanField(this, 2, value); 287 }; 288 289 290 291 /** 292 * List of repeated fields within this message type. 293 * @private {!Array<number>} 294 * @const 295 */ 296 proto.google.api.HttpRule.repeatedFields_ = [11]; 297 298 /** 299 * Oneof group definitions for this message. Each group defines the field 300 * numbers belonging to that group. When of these fields' value is set, all 301 * other fields in the group are cleared. During deserialization, if multiple 302 * fields are encountered for a group, only the last value seen will be kept. 303 * @private {!Array<!Array<number>>} 304 * @const 305 */ 306 proto.google.api.HttpRule.oneofGroups_ = [[2,3,4,5,6,8]]; 307 308 /** 309 * @enum {number} 310 */ 311 proto.google.api.HttpRule.PatternCase = { 312 PATTERN_NOT_SET: 0, 313 GET: 2, 314 PUT: 3, 315 POST: 4, 316 DELETE: 5, 317 PATCH: 6, 318 CUSTOM: 8 319 }; 320 321 /** 322 * @return {proto.google.api.HttpRule.PatternCase} 323 */ 324 proto.google.api.HttpRule.prototype.getPatternCase = function() { 325 return /** @type {proto.google.api.HttpRule.PatternCase} */(jspb.Message.computeOneofCase(this, proto.google.api.HttpRule.oneofGroups_[0])); 326 }; 327 328 329 330 if (jspb.Message.GENERATE_TO_OBJECT) { 331 /** 332 * Creates an object representation of this proto. 333 * Field names that are reserved in JavaScript and will be renamed to pb_name. 334 * Optional fields that are not set will be set to undefined. 335 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. 336 * For the list of reserved names please see: 337 * net/proto2/compiler/js/internal/generator.cc#kKeyword. 338 * @param {boolean=} opt_includeInstance Deprecated. whether to include the 339 * JSPB instance for transitional soy proto support: 340 * http://goto/soy-param-migration 341 * @return {!Object} 342 */ 343 proto.google.api.HttpRule.prototype.toObject = function(opt_includeInstance) { 344 return proto.google.api.HttpRule.toObject(opt_includeInstance, this); 345 }; 346 347 348 /** 349 * Static version of the {@see toObject} method. 350 * @param {boolean|undefined} includeInstance Deprecated. Whether to include 351 * the JSPB instance for transitional soy proto support: 352 * http://goto/soy-param-migration 353 * @param {!proto.google.api.HttpRule} msg The msg instance to transform. 354 * @return {!Object} 355 * @suppress {unusedLocalVariables} f is only used for nested messages 356 */ 357 proto.google.api.HttpRule.toObject = function(includeInstance, msg) { 358 var f, obj = { 359 selector: jspb.Message.getFieldWithDefault(msg, 1, ""), 360 get: jspb.Message.getFieldWithDefault(msg, 2, ""), 361 put: jspb.Message.getFieldWithDefault(msg, 3, ""), 362 post: jspb.Message.getFieldWithDefault(msg, 4, ""), 363 pb_delete: jspb.Message.getFieldWithDefault(msg, 5, ""), 364 patch: jspb.Message.getFieldWithDefault(msg, 6, ""), 365 custom: (f = msg.getCustom()) && proto.google.api.CustomHttpPattern.toObject(includeInstance, f), 366 body: jspb.Message.getFieldWithDefault(msg, 7, ""), 367 responseBody: jspb.Message.getFieldWithDefault(msg, 12, ""), 368 additionalBindingsList: jspb.Message.toObjectList(msg.getAdditionalBindingsList(), 369 proto.google.api.HttpRule.toObject, includeInstance) 370 }; 371 372 if (includeInstance) { 373 obj.$jspbMessageInstance = msg; 374 } 375 return obj; 376 }; 377 } 378 379 380 /** 381 * Deserializes binary data (in protobuf wire format). 382 * @param {jspb.ByteSource} bytes The bytes to deserialize. 383 * @return {!proto.google.api.HttpRule} 384 */ 385 proto.google.api.HttpRule.deserializeBinary = function(bytes) { 386 var reader = new jspb.BinaryReader(bytes); 387 var msg = new proto.google.api.HttpRule; 388 return proto.google.api.HttpRule.deserializeBinaryFromReader(msg, reader); 389 }; 390 391 392 /** 393 * Deserializes binary data (in protobuf wire format) from the 394 * given reader into the given message object. 395 * @param {!proto.google.api.HttpRule} msg The message object to deserialize into. 396 * @param {!jspb.BinaryReader} reader The BinaryReader to use. 397 * @return {!proto.google.api.HttpRule} 398 */ 399 proto.google.api.HttpRule.deserializeBinaryFromReader = function(msg, reader) { 400 while (reader.nextField()) { 401 if (reader.isEndGroup()) { 402 break; 403 } 404 var field = reader.getFieldNumber(); 405 switch (field) { 406 case 1: 407 var value = /** @type {string} */ (reader.readString()); 408 msg.setSelector(value); 409 break; 410 case 2: 411 var value = /** @type {string} */ (reader.readString()); 412 msg.setGet(value); 413 break; 414 case 3: 415 var value = /** @type {string} */ (reader.readString()); 416 msg.setPut(value); 417 break; 418 case 4: 419 var value = /** @type {string} */ (reader.readString()); 420 msg.setPost(value); 421 break; 422 case 5: 423 var value = /** @type {string} */ (reader.readString()); 424 msg.setDelete(value); 425 break; 426 case 6: 427 var value = /** @type {string} */ (reader.readString()); 428 msg.setPatch(value); 429 break; 430 case 8: 431 var value = new proto.google.api.CustomHttpPattern; 432 reader.readMessage(value,proto.google.api.CustomHttpPattern.deserializeBinaryFromReader); 433 msg.setCustom(value); 434 break; 435 case 7: 436 var value = /** @type {string} */ (reader.readString()); 437 msg.setBody(value); 438 break; 439 case 12: 440 var value = /** @type {string} */ (reader.readString()); 441 msg.setResponseBody(value); 442 break; 443 case 11: 444 var value = new proto.google.api.HttpRule; 445 reader.readMessage(value,proto.google.api.HttpRule.deserializeBinaryFromReader); 446 msg.addAdditionalBindings(value); 447 break; 448 default: 449 reader.skipField(); 450 break; 451 } 452 } 453 return msg; 454 }; 455 456 457 /** 458 * Serializes the message to binary data (in protobuf wire format). 459 * @return {!Uint8Array} 460 */ 461 proto.google.api.HttpRule.prototype.serializeBinary = function() { 462 var writer = new jspb.BinaryWriter(); 463 proto.google.api.HttpRule.serializeBinaryToWriter(this, writer); 464 return writer.getResultBuffer(); 465 }; 466 467 468 /** 469 * Serializes the given message to binary data (in protobuf wire 470 * format), writing to the given BinaryWriter. 471 * @param {!proto.google.api.HttpRule} message 472 * @param {!jspb.BinaryWriter} writer 473 * @suppress {unusedLocalVariables} f is only used for nested messages 474 */ 475 proto.google.api.HttpRule.serializeBinaryToWriter = function(message, writer) { 476 var f = undefined; 477 f = message.getSelector(); 478 if (f.length > 0) { 479 writer.writeString( 480 1, 481 f 482 ); 483 } 484 f = /** @type {string} */ (jspb.Message.getField(message, 2)); 485 if (f != null) { 486 writer.writeString( 487 2, 488 f 489 ); 490 } 491 f = /** @type {string} */ (jspb.Message.getField(message, 3)); 492 if (f != null) { 493 writer.writeString( 494 3, 495 f 496 ); 497 } 498 f = /** @type {string} */ (jspb.Message.getField(message, 4)); 499 if (f != null) { 500 writer.writeString( 501 4, 502 f 503 ); 504 } 505 f = /** @type {string} */ (jspb.Message.getField(message, 5)); 506 if (f != null) { 507 writer.writeString( 508 5, 509 f 510 ); 511 } 512 f = /** @type {string} */ (jspb.Message.getField(message, 6)); 513 if (f != null) { 514 writer.writeString( 515 6, 516 f 517 ); 518 } 519 f = message.getCustom(); 520 if (f != null) { 521 writer.writeMessage( 522 8, 523 f, 524 proto.google.api.CustomHttpPattern.serializeBinaryToWriter 525 ); 526 } 527 f = message.getBody(); 528 if (f.length > 0) { 529 writer.writeString( 530 7, 531 f 532 ); 533 } 534 f = message.getResponseBody(); 535 if (f.length > 0) { 536 writer.writeString( 537 12, 538 f 539 ); 540 } 541 f = message.getAdditionalBindingsList(); 542 if (f.length > 0) { 543 writer.writeRepeatedMessage( 544 11, 545 f, 546 proto.google.api.HttpRule.serializeBinaryToWriter 547 ); 548 } 549 }; 550 551 552 /** 553 * optional string selector = 1; 554 * @return {string} 555 */ 556 proto.google.api.HttpRule.prototype.getSelector = function() { 557 return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); 558 }; 559 560 561 /** 562 * @param {string} value 563 * @return {!proto.google.api.HttpRule} returns this 564 */ 565 proto.google.api.HttpRule.prototype.setSelector = function(value) { 566 return jspb.Message.setProto3StringField(this, 1, value); 567 }; 568 569 570 /** 571 * optional string get = 2; 572 * @return {string} 573 */ 574 proto.google.api.HttpRule.prototype.getGet = function() { 575 return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); 576 }; 577 578 579 /** 580 * @param {string} value 581 * @return {!proto.google.api.HttpRule} returns this 582 */ 583 proto.google.api.HttpRule.prototype.setGet = function(value) { 584 return jspb.Message.setOneofField(this, 2, proto.google.api.HttpRule.oneofGroups_[0], value); 585 }; 586 587 588 /** 589 * Clears the field making it undefined. 590 * @return {!proto.google.api.HttpRule} returns this 591 */ 592 proto.google.api.HttpRule.prototype.clearGet = function() { 593 return jspb.Message.setOneofField(this, 2, proto.google.api.HttpRule.oneofGroups_[0], undefined); 594 }; 595 596 597 /** 598 * Returns whether this field is set. 599 * @return {boolean} 600 */ 601 proto.google.api.HttpRule.prototype.hasGet = function() { 602 return jspb.Message.getField(this, 2) != null; 603 }; 604 605 606 /** 607 * optional string put = 3; 608 * @return {string} 609 */ 610 proto.google.api.HttpRule.prototype.getPut = function() { 611 return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); 612 }; 613 614 615 /** 616 * @param {string} value 617 * @return {!proto.google.api.HttpRule} returns this 618 */ 619 proto.google.api.HttpRule.prototype.setPut = function(value) { 620 return jspb.Message.setOneofField(this, 3, proto.google.api.HttpRule.oneofGroups_[0], value); 621 }; 622 623 624 /** 625 * Clears the field making it undefined. 626 * @return {!proto.google.api.HttpRule} returns this 627 */ 628 proto.google.api.HttpRule.prototype.clearPut = function() { 629 return jspb.Message.setOneofField(this, 3, proto.google.api.HttpRule.oneofGroups_[0], undefined); 630 }; 631 632 633 /** 634 * Returns whether this field is set. 635 * @return {boolean} 636 */ 637 proto.google.api.HttpRule.prototype.hasPut = function() { 638 return jspb.Message.getField(this, 3) != null; 639 }; 640 641 642 /** 643 * optional string post = 4; 644 * @return {string} 645 */ 646 proto.google.api.HttpRule.prototype.getPost = function() { 647 return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); 648 }; 649 650 651 /** 652 * @param {string} value 653 * @return {!proto.google.api.HttpRule} returns this 654 */ 655 proto.google.api.HttpRule.prototype.setPost = function(value) { 656 return jspb.Message.setOneofField(this, 4, proto.google.api.HttpRule.oneofGroups_[0], value); 657 }; 658 659 660 /** 661 * Clears the field making it undefined. 662 * @return {!proto.google.api.HttpRule} returns this 663 */ 664 proto.google.api.HttpRule.prototype.clearPost = function() { 665 return jspb.Message.setOneofField(this, 4, proto.google.api.HttpRule.oneofGroups_[0], undefined); 666 }; 667 668 669 /** 670 * Returns whether this field is set. 671 * @return {boolean} 672 */ 673 proto.google.api.HttpRule.prototype.hasPost = function() { 674 return jspb.Message.getField(this, 4) != null; 675 }; 676 677 678 /** 679 * optional string delete = 5; 680 * @return {string} 681 */ 682 proto.google.api.HttpRule.prototype.getDelete = function() { 683 return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); 684 }; 685 686 687 /** 688 * @param {string} value 689 * @return {!proto.google.api.HttpRule} returns this 690 */ 691 proto.google.api.HttpRule.prototype.setDelete = function(value) { 692 return jspb.Message.setOneofField(this, 5, proto.google.api.HttpRule.oneofGroups_[0], value); 693 }; 694 695 696 /** 697 * Clears the field making it undefined. 698 * @return {!proto.google.api.HttpRule} returns this 699 */ 700 proto.google.api.HttpRule.prototype.clearDelete = function() { 701 return jspb.Message.setOneofField(this, 5, proto.google.api.HttpRule.oneofGroups_[0], undefined); 702 }; 703 704 705 /** 706 * Returns whether this field is set. 707 * @return {boolean} 708 */ 709 proto.google.api.HttpRule.prototype.hasDelete = function() { 710 return jspb.Message.getField(this, 5) != null; 711 }; 712 713 714 /** 715 * optional string patch = 6; 716 * @return {string} 717 */ 718 proto.google.api.HttpRule.prototype.getPatch = function() { 719 return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); 720 }; 721 722 723 /** 724 * @param {string} value 725 * @return {!proto.google.api.HttpRule} returns this 726 */ 727 proto.google.api.HttpRule.prototype.setPatch = function(value) { 728 return jspb.Message.setOneofField(this, 6, proto.google.api.HttpRule.oneofGroups_[0], value); 729 }; 730 731 732 /** 733 * Clears the field making it undefined. 734 * @return {!proto.google.api.HttpRule} returns this 735 */ 736 proto.google.api.HttpRule.prototype.clearPatch = function() { 737 return jspb.Message.setOneofField(this, 6, proto.google.api.HttpRule.oneofGroups_[0], undefined); 738 }; 739 740 741 /** 742 * Returns whether this field is set. 743 * @return {boolean} 744 */ 745 proto.google.api.HttpRule.prototype.hasPatch = function() { 746 return jspb.Message.getField(this, 6) != null; 747 }; 748 749 750 /** 751 * optional CustomHttpPattern custom = 8; 752 * @return {?proto.google.api.CustomHttpPattern} 753 */ 754 proto.google.api.HttpRule.prototype.getCustom = function() { 755 return /** @type{?proto.google.api.CustomHttpPattern} */ ( 756 jspb.Message.getWrapperField(this, proto.google.api.CustomHttpPattern, 8)); 757 }; 758 759 760 /** 761 * @param {?proto.google.api.CustomHttpPattern|undefined} value 762 * @return {!proto.google.api.HttpRule} returns this 763 */ 764 proto.google.api.HttpRule.prototype.setCustom = function(value) { 765 return jspb.Message.setOneofWrapperField(this, 8, proto.google.api.HttpRule.oneofGroups_[0], value); 766 }; 767 768 769 /** 770 * Clears the message field making it undefined. 771 * @return {!proto.google.api.HttpRule} returns this 772 */ 773 proto.google.api.HttpRule.prototype.clearCustom = function() { 774 return this.setCustom(undefined); 775 }; 776 777 778 /** 779 * Returns whether this field is set. 780 * @return {boolean} 781 */ 782 proto.google.api.HttpRule.prototype.hasCustom = function() { 783 return jspb.Message.getField(this, 8) != null; 784 }; 785 786 787 /** 788 * optional string body = 7; 789 * @return {string} 790 */ 791 proto.google.api.HttpRule.prototype.getBody = function() { 792 return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); 793 }; 794 795 796 /** 797 * @param {string} value 798 * @return {!proto.google.api.HttpRule} returns this 799 */ 800 proto.google.api.HttpRule.prototype.setBody = function(value) { 801 return jspb.Message.setProto3StringField(this, 7, value); 802 }; 803 804 805 /** 806 * optional string response_body = 12; 807 * @return {string} 808 */ 809 proto.google.api.HttpRule.prototype.getResponseBody = function() { 810 return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); 811 }; 812 813 814 /** 815 * @param {string} value 816 * @return {!proto.google.api.HttpRule} returns this 817 */ 818 proto.google.api.HttpRule.prototype.setResponseBody = function(value) { 819 return jspb.Message.setProto3StringField(this, 12, value); 820 }; 821 822 823 /** 824 * repeated HttpRule additional_bindings = 11; 825 * @return {!Array<!proto.google.api.HttpRule>} 826 */ 827 proto.google.api.HttpRule.prototype.getAdditionalBindingsList = function() { 828 return /** @type{!Array<!proto.google.api.HttpRule>} */ ( 829 jspb.Message.getRepeatedWrapperField(this, proto.google.api.HttpRule, 11)); 830 }; 831 832 833 /** 834 * @param {!Array<!proto.google.api.HttpRule>} value 835 * @return {!proto.google.api.HttpRule} returns this 836 */ 837 proto.google.api.HttpRule.prototype.setAdditionalBindingsList = function(value) { 838 return jspb.Message.setRepeatedWrapperField(this, 11, value); 839 }; 840 841 842 /** 843 * @param {!proto.google.api.HttpRule=} opt_value 844 * @param {number=} opt_index 845 * @return {!proto.google.api.HttpRule} 846 */ 847 proto.google.api.HttpRule.prototype.addAdditionalBindings = function(opt_value, opt_index) { 848 return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.google.api.HttpRule, opt_index); 849 }; 850 851 852 /** 853 * Clears the list making it empty but non-null. 854 * @return {!proto.google.api.HttpRule} returns this 855 */ 856 proto.google.api.HttpRule.prototype.clearAdditionalBindingsList = function() { 857 return this.setAdditionalBindingsList([]); 858 }; 859 860 861 862 863 864 if (jspb.Message.GENERATE_TO_OBJECT) { 865 /** 866 * Creates an object representation of this proto. 867 * Field names that are reserved in JavaScript and will be renamed to pb_name. 868 * Optional fields that are not set will be set to undefined. 869 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. 870 * For the list of reserved names please see: 871 * net/proto2/compiler/js/internal/generator.cc#kKeyword. 872 * @param {boolean=} opt_includeInstance Deprecated. whether to include the 873 * JSPB instance for transitional soy proto support: 874 * http://goto/soy-param-migration 875 * @return {!Object} 876 */ 877 proto.google.api.CustomHttpPattern.prototype.toObject = function(opt_includeInstance) { 878 return proto.google.api.CustomHttpPattern.toObject(opt_includeInstance, this); 879 }; 880 881 882 /** 883 * Static version of the {@see toObject} method. 884 * @param {boolean|undefined} includeInstance Deprecated. Whether to include 885 * the JSPB instance for transitional soy proto support: 886 * http://goto/soy-param-migration 887 * @param {!proto.google.api.CustomHttpPattern} msg The msg instance to transform. 888 * @return {!Object} 889 * @suppress {unusedLocalVariables} f is only used for nested messages 890 */ 891 proto.google.api.CustomHttpPattern.toObject = function(includeInstance, msg) { 892 var f, obj = { 893 kind: jspb.Message.getFieldWithDefault(msg, 1, ""), 894 path: jspb.Message.getFieldWithDefault(msg, 2, "") 895 }; 896 897 if (includeInstance) { 898 obj.$jspbMessageInstance = msg; 899 } 900 return obj; 901 }; 902 } 903 904 905 /** 906 * Deserializes binary data (in protobuf wire format). 907 * @param {jspb.ByteSource} bytes The bytes to deserialize. 908 * @return {!proto.google.api.CustomHttpPattern} 909 */ 910 proto.google.api.CustomHttpPattern.deserializeBinary = function(bytes) { 911 var reader = new jspb.BinaryReader(bytes); 912 var msg = new proto.google.api.CustomHttpPattern; 913 return proto.google.api.CustomHttpPattern.deserializeBinaryFromReader(msg, reader); 914 }; 915 916 917 /** 918 * Deserializes binary data (in protobuf wire format) from the 919 * given reader into the given message object. 920 * @param {!proto.google.api.CustomHttpPattern} msg The message object to deserialize into. 921 * @param {!jspb.BinaryReader} reader The BinaryReader to use. 922 * @return {!proto.google.api.CustomHttpPattern} 923 */ 924 proto.google.api.CustomHttpPattern.deserializeBinaryFromReader = function(msg, reader) { 925 while (reader.nextField()) { 926 if (reader.isEndGroup()) { 927 break; 928 } 929 var field = reader.getFieldNumber(); 930 switch (field) { 931 case 1: 932 var value = /** @type {string} */ (reader.readString()); 933 msg.setKind(value); 934 break; 935 case 2: 936 var value = /** @type {string} */ (reader.readString()); 937 msg.setPath(value); 938 break; 939 default: 940 reader.skipField(); 941 break; 942 } 943 } 944 return msg; 945 }; 946 947 948 /** 949 * Serializes the message to binary data (in protobuf wire format). 950 * @return {!Uint8Array} 951 */ 952 proto.google.api.CustomHttpPattern.prototype.serializeBinary = function() { 953 var writer = new jspb.BinaryWriter(); 954 proto.google.api.CustomHttpPattern.serializeBinaryToWriter(this, writer); 955 return writer.getResultBuffer(); 956 }; 957 958 959 /** 960 * Serializes the given message to binary data (in protobuf wire 961 * format), writing to the given BinaryWriter. 962 * @param {!proto.google.api.CustomHttpPattern} message 963 * @param {!jspb.BinaryWriter} writer 964 * @suppress {unusedLocalVariables} f is only used for nested messages 965 */ 966 proto.google.api.CustomHttpPattern.serializeBinaryToWriter = function(message, writer) { 967 var f = undefined; 968 f = message.getKind(); 969 if (f.length > 0) { 970 writer.writeString( 971 1, 972 f 973 ); 974 } 975 f = message.getPath(); 976 if (f.length > 0) { 977 writer.writeString( 978 2, 979 f 980 ); 981 } 982 }; 983 984 985 /** 986 * optional string kind = 1; 987 * @return {string} 988 */ 989 proto.google.api.CustomHttpPattern.prototype.getKind = function() { 990 return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); 991 }; 992 993 994 /** 995 * @param {string} value 996 * @return {!proto.google.api.CustomHttpPattern} returns this 997 */ 998 proto.google.api.CustomHttpPattern.prototype.setKind = function(value) { 999 return jspb.Message.setProto3StringField(this, 1, value); 1000 }; 1001 1002 1003 /** 1004 * optional string path = 2; 1005 * @return {string} 1006 */ 1007 proto.google.api.CustomHttpPattern.prototype.getPath = function() { 1008 return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); 1009 }; 1010 1011 1012 /** 1013 * @param {string} value 1014 * @return {!proto.google.api.CustomHttpPattern} returns this 1015 */ 1016 proto.google.api.CustomHttpPattern.prototype.setPath = function(value) { 1017 return jspb.Message.setProto3StringField(this, 2, value); 1018 }; 1019 1020 1021 goog.object.extend(exports, proto.google.api);