@superblocksteam/sabs-types-js 0.127.0

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