Adrià Vilanova MartÃnez | 413cb44 | 2021-09-06 00:30:45 +0200 | [diff] [blame] | 1 | // source: google/protobuf/wrappers.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 proto = {}; |
| 17 | |
| 18 | goog.exportSymbol('google.protobuf.BoolValue', null, proto); |
| 19 | goog.exportSymbol('google.protobuf.BytesValue', null, proto); |
| 20 | goog.exportSymbol('google.protobuf.DoubleValue', null, proto); |
| 21 | goog.exportSymbol('google.protobuf.FloatValue', null, proto); |
| 22 | goog.exportSymbol('google.protobuf.Int32Value', null, proto); |
| 23 | goog.exportSymbol('google.protobuf.Int64Value', null, proto); |
| 24 | goog.exportSymbol('google.protobuf.StringValue', null, proto); |
| 25 | goog.exportSymbol('google.protobuf.UInt32Value', null, proto); |
| 26 | goog.exportSymbol('google.protobuf.UInt64Value', null, proto); |
| 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.protobuf.DoubleValue = function(opt_data) { |
| 38 | jspb.Message.initialize(this, opt_data, 0, -1, null, null); |
| 39 | }; |
| 40 | goog.inherits(proto.google.protobuf.DoubleValue, jspb.Message); |
| 41 | if (goog.DEBUG && !COMPILED) { |
| 42 | /** |
| 43 | * @public |
| 44 | * @override |
| 45 | */ |
| 46 | proto.google.protobuf.DoubleValue.displayName = 'proto.google.protobuf.DoubleValue'; |
| 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.protobuf.FloatValue = function(opt_data) { |
| 59 | jspb.Message.initialize(this, opt_data, 0, -1, null, null); |
| 60 | }; |
| 61 | goog.inherits(proto.google.protobuf.FloatValue, jspb.Message); |
| 62 | if (goog.DEBUG && !COMPILED) { |
| 63 | /** |
| 64 | * @public |
| 65 | * @override |
| 66 | */ |
| 67 | proto.google.protobuf.FloatValue.displayName = 'proto.google.protobuf.FloatValue'; |
| 68 | } |
| 69 | /** |
| 70 | * Generated by JsPbCodeGenerator. |
| 71 | * @param {Array=} opt_data Optional initial data array, typically from a |
| 72 | * server response, or constructed directly in Javascript. The array is used |
| 73 | * in place and becomes part of the constructed object. It is not cloned. |
| 74 | * If no data is provided, the constructed object will be empty, but still |
| 75 | * valid. |
| 76 | * @extends {jspb.Message} |
| 77 | * @constructor |
| 78 | */ |
| 79 | proto.google.protobuf.Int64Value = function(opt_data) { |
| 80 | jspb.Message.initialize(this, opt_data, 0, -1, null, null); |
| 81 | }; |
| 82 | goog.inherits(proto.google.protobuf.Int64Value, jspb.Message); |
| 83 | if (goog.DEBUG && !COMPILED) { |
| 84 | /** |
| 85 | * @public |
| 86 | * @override |
| 87 | */ |
| 88 | proto.google.protobuf.Int64Value.displayName = 'proto.google.protobuf.Int64Value'; |
| 89 | } |
| 90 | /** |
| 91 | * Generated by JsPbCodeGenerator. |
| 92 | * @param {Array=} opt_data Optional initial data array, typically from a |
| 93 | * server response, or constructed directly in Javascript. The array is used |
| 94 | * in place and becomes part of the constructed object. It is not cloned. |
| 95 | * If no data is provided, the constructed object will be empty, but still |
| 96 | * valid. |
| 97 | * @extends {jspb.Message} |
| 98 | * @constructor |
| 99 | */ |
| 100 | proto.google.protobuf.UInt64Value = function(opt_data) { |
| 101 | jspb.Message.initialize(this, opt_data, 0, -1, null, null); |
| 102 | }; |
| 103 | goog.inherits(proto.google.protobuf.UInt64Value, jspb.Message); |
| 104 | if (goog.DEBUG && !COMPILED) { |
| 105 | /** |
| 106 | * @public |
| 107 | * @override |
| 108 | */ |
| 109 | proto.google.protobuf.UInt64Value.displayName = 'proto.google.protobuf.UInt64Value'; |
| 110 | } |
| 111 | /** |
| 112 | * Generated by JsPbCodeGenerator. |
| 113 | * @param {Array=} opt_data Optional initial data array, typically from a |
| 114 | * server response, or constructed directly in Javascript. The array is used |
| 115 | * in place and becomes part of the constructed object. It is not cloned. |
| 116 | * If no data is provided, the constructed object will be empty, but still |
| 117 | * valid. |
| 118 | * @extends {jspb.Message} |
| 119 | * @constructor |
| 120 | */ |
| 121 | proto.google.protobuf.Int32Value = function(opt_data) { |
| 122 | jspb.Message.initialize(this, opt_data, 0, -1, null, null); |
| 123 | }; |
| 124 | goog.inherits(proto.google.protobuf.Int32Value, jspb.Message); |
| 125 | if (goog.DEBUG && !COMPILED) { |
| 126 | /** |
| 127 | * @public |
| 128 | * @override |
| 129 | */ |
| 130 | proto.google.protobuf.Int32Value.displayName = 'proto.google.protobuf.Int32Value'; |
| 131 | } |
| 132 | /** |
| 133 | * Generated by JsPbCodeGenerator. |
| 134 | * @param {Array=} opt_data Optional initial data array, typically from a |
| 135 | * server response, or constructed directly in Javascript. The array is used |
| 136 | * in place and becomes part of the constructed object. It is not cloned. |
| 137 | * If no data is provided, the constructed object will be empty, but still |
| 138 | * valid. |
| 139 | * @extends {jspb.Message} |
| 140 | * @constructor |
| 141 | */ |
| 142 | proto.google.protobuf.UInt32Value = function(opt_data) { |
| 143 | jspb.Message.initialize(this, opt_data, 0, -1, null, null); |
| 144 | }; |
| 145 | goog.inherits(proto.google.protobuf.UInt32Value, jspb.Message); |
| 146 | if (goog.DEBUG && !COMPILED) { |
| 147 | /** |
| 148 | * @public |
| 149 | * @override |
| 150 | */ |
| 151 | proto.google.protobuf.UInt32Value.displayName = 'proto.google.protobuf.UInt32Value'; |
| 152 | } |
| 153 | /** |
| 154 | * Generated by JsPbCodeGenerator. |
| 155 | * @param {Array=} opt_data Optional initial data array, typically from a |
| 156 | * server response, or constructed directly in Javascript. The array is used |
| 157 | * in place and becomes part of the constructed object. It is not cloned. |
| 158 | * If no data is provided, the constructed object will be empty, but still |
| 159 | * valid. |
| 160 | * @extends {jspb.Message} |
| 161 | * @constructor |
| 162 | */ |
| 163 | proto.google.protobuf.BoolValue = function(opt_data) { |
| 164 | jspb.Message.initialize(this, opt_data, 0, -1, null, null); |
| 165 | }; |
| 166 | goog.inherits(proto.google.protobuf.BoolValue, jspb.Message); |
| 167 | if (goog.DEBUG && !COMPILED) { |
| 168 | /** |
| 169 | * @public |
| 170 | * @override |
| 171 | */ |
| 172 | proto.google.protobuf.BoolValue.displayName = 'proto.google.protobuf.BoolValue'; |
| 173 | } |
| 174 | /** |
| 175 | * Generated by JsPbCodeGenerator. |
| 176 | * @param {Array=} opt_data Optional initial data array, typically from a |
| 177 | * server response, or constructed directly in Javascript. The array is used |
| 178 | * in place and becomes part of the constructed object. It is not cloned. |
| 179 | * If no data is provided, the constructed object will be empty, but still |
| 180 | * valid. |
| 181 | * @extends {jspb.Message} |
| 182 | * @constructor |
| 183 | */ |
| 184 | proto.google.protobuf.StringValue = function(opt_data) { |
| 185 | jspb.Message.initialize(this, opt_data, 0, -1, null, null); |
| 186 | }; |
| 187 | goog.inherits(proto.google.protobuf.StringValue, jspb.Message); |
| 188 | if (goog.DEBUG && !COMPILED) { |
| 189 | /** |
| 190 | * @public |
| 191 | * @override |
| 192 | */ |
| 193 | proto.google.protobuf.StringValue.displayName = 'proto.google.protobuf.StringValue'; |
| 194 | } |
| 195 | /** |
| 196 | * Generated by JsPbCodeGenerator. |
| 197 | * @param {Array=} opt_data Optional initial data array, typically from a |
| 198 | * server response, or constructed directly in Javascript. The array is used |
| 199 | * in place and becomes part of the constructed object. It is not cloned. |
| 200 | * If no data is provided, the constructed object will be empty, but still |
| 201 | * valid. |
| 202 | * @extends {jspb.Message} |
| 203 | * @constructor |
| 204 | */ |
| 205 | proto.google.protobuf.BytesValue = function(opt_data) { |
| 206 | jspb.Message.initialize(this, opt_data, 0, -1, null, null); |
| 207 | }; |
| 208 | goog.inherits(proto.google.protobuf.BytesValue, jspb.Message); |
| 209 | if (goog.DEBUG && !COMPILED) { |
| 210 | /** |
| 211 | * @public |
| 212 | * @override |
| 213 | */ |
| 214 | proto.google.protobuf.BytesValue.displayName = 'proto.google.protobuf.BytesValue'; |
| 215 | } |
| 216 | |
| 217 | |
| 218 | |
| 219 | if (jspb.Message.GENERATE_TO_OBJECT) { |
| 220 | /** |
| 221 | * Creates an object representation of this proto. |
| 222 | * Field names that are reserved in JavaScript and will be renamed to pb_name. |
| 223 | * Optional fields that are not set will be set to undefined. |
| 224 | * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. |
| 225 | * For the list of reserved names please see: |
| 226 | * net/proto2/compiler/js/internal/generator.cc#kKeyword. |
| 227 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the |
| 228 | * JSPB instance for transitional soy proto support: |
| 229 | * http://goto/soy-param-migration |
| 230 | * @return {!Object} |
| 231 | */ |
| 232 | proto.google.protobuf.DoubleValue.prototype.toObject = function(opt_includeInstance) { |
| 233 | return proto.google.protobuf.DoubleValue.toObject(opt_includeInstance, this); |
| 234 | }; |
| 235 | |
| 236 | |
| 237 | /** |
| 238 | * Static version of the {@see toObject} method. |
| 239 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include |
| 240 | * the JSPB instance for transitional soy proto support: |
| 241 | * http://goto/soy-param-migration |
| 242 | * @param {!proto.google.protobuf.DoubleValue} msg The msg instance to transform. |
| 243 | * @return {!Object} |
| 244 | * @suppress {unusedLocalVariables} f is only used for nested messages |
| 245 | */ |
| 246 | proto.google.protobuf.DoubleValue.toObject = function(includeInstance, msg) { |
| 247 | var f, obj = { |
| 248 | value: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0) |
| 249 | }; |
| 250 | |
| 251 | if (includeInstance) { |
| 252 | obj.$jspbMessageInstance = msg; |
| 253 | } |
| 254 | return obj; |
| 255 | }; |
| 256 | } |
| 257 | |
| 258 | |
| 259 | /** |
| 260 | * Deserializes binary data (in protobuf wire format). |
| 261 | * @param {jspb.ByteSource} bytes The bytes to deserialize. |
| 262 | * @return {!proto.google.protobuf.DoubleValue} |
| 263 | */ |
| 264 | proto.google.protobuf.DoubleValue.deserializeBinary = function(bytes) { |
| 265 | var reader = new jspb.BinaryReader(bytes); |
| 266 | var msg = new proto.google.protobuf.DoubleValue; |
| 267 | return proto.google.protobuf.DoubleValue.deserializeBinaryFromReader(msg, reader); |
| 268 | }; |
| 269 | |
| 270 | |
| 271 | /** |
| 272 | * Deserializes binary data (in protobuf wire format) from the |
| 273 | * given reader into the given message object. |
| 274 | * @param {!proto.google.protobuf.DoubleValue} msg The message object to deserialize into. |
| 275 | * @param {!jspb.BinaryReader} reader The BinaryReader to use. |
| 276 | * @return {!proto.google.protobuf.DoubleValue} |
| 277 | */ |
| 278 | proto.google.protobuf.DoubleValue.deserializeBinaryFromReader = function(msg, reader) { |
| 279 | while (reader.nextField()) { |
| 280 | if (reader.isEndGroup()) { |
| 281 | break; |
| 282 | } |
| 283 | var field = reader.getFieldNumber(); |
| 284 | switch (field) { |
| 285 | case 1: |
| 286 | var value = /** @type {number} */ (reader.readDouble()); |
| 287 | msg.setValue(value); |
| 288 | break; |
| 289 | default: |
| 290 | reader.skipField(); |
| 291 | break; |
| 292 | } |
| 293 | } |
| 294 | return msg; |
| 295 | }; |
| 296 | |
| 297 | |
| 298 | /** |
| 299 | * Serializes the message to binary data (in protobuf wire format). |
| 300 | * @return {!Uint8Array} |
| 301 | */ |
| 302 | proto.google.protobuf.DoubleValue.prototype.serializeBinary = function() { |
| 303 | var writer = new jspb.BinaryWriter(); |
| 304 | proto.google.protobuf.DoubleValue.serializeBinaryToWriter(this, writer); |
| 305 | return writer.getResultBuffer(); |
| 306 | }; |
| 307 | |
| 308 | |
| 309 | /** |
| 310 | * Serializes the given message to binary data (in protobuf wire |
| 311 | * format), writing to the given BinaryWriter. |
| 312 | * @param {!proto.google.protobuf.DoubleValue} message |
| 313 | * @param {!jspb.BinaryWriter} writer |
| 314 | * @suppress {unusedLocalVariables} f is only used for nested messages |
| 315 | */ |
| 316 | proto.google.protobuf.DoubleValue.serializeBinaryToWriter = function(message, writer) { |
| 317 | var f = undefined; |
| 318 | f = message.getValue(); |
| 319 | if (f !== 0.0) { |
| 320 | writer.writeDouble( |
| 321 | 1, |
| 322 | f |
| 323 | ); |
| 324 | } |
| 325 | }; |
| 326 | |
| 327 | |
| 328 | /** |
| 329 | * optional double value = 1; |
| 330 | * @return {number} |
| 331 | */ |
| 332 | proto.google.protobuf.DoubleValue.prototype.getValue = function() { |
| 333 | return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); |
| 334 | }; |
| 335 | |
| 336 | |
| 337 | /** |
| 338 | * @param {number} value |
| 339 | * @return {!proto.google.protobuf.DoubleValue} returns this |
| 340 | */ |
| 341 | proto.google.protobuf.DoubleValue.prototype.setValue = function(value) { |
| 342 | return jspb.Message.setProto3FloatField(this, 1, value); |
| 343 | }; |
| 344 | |
| 345 | |
| 346 | |
| 347 | |
| 348 | |
| 349 | if (jspb.Message.GENERATE_TO_OBJECT) { |
| 350 | /** |
| 351 | * Creates an object representation of this proto. |
| 352 | * Field names that are reserved in JavaScript and will be renamed to pb_name. |
| 353 | * Optional fields that are not set will be set to undefined. |
| 354 | * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. |
| 355 | * For the list of reserved names please see: |
| 356 | * net/proto2/compiler/js/internal/generator.cc#kKeyword. |
| 357 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the |
| 358 | * JSPB instance for transitional soy proto support: |
| 359 | * http://goto/soy-param-migration |
| 360 | * @return {!Object} |
| 361 | */ |
| 362 | proto.google.protobuf.FloatValue.prototype.toObject = function(opt_includeInstance) { |
| 363 | return proto.google.protobuf.FloatValue.toObject(opt_includeInstance, this); |
| 364 | }; |
| 365 | |
| 366 | |
| 367 | /** |
| 368 | * Static version of the {@see toObject} method. |
| 369 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include |
| 370 | * the JSPB instance for transitional soy proto support: |
| 371 | * http://goto/soy-param-migration |
| 372 | * @param {!proto.google.protobuf.FloatValue} msg The msg instance to transform. |
| 373 | * @return {!Object} |
| 374 | * @suppress {unusedLocalVariables} f is only used for nested messages |
| 375 | */ |
| 376 | proto.google.protobuf.FloatValue.toObject = function(includeInstance, msg) { |
| 377 | var f, obj = { |
| 378 | value: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0) |
| 379 | }; |
| 380 | |
| 381 | if (includeInstance) { |
| 382 | obj.$jspbMessageInstance = msg; |
| 383 | } |
| 384 | return obj; |
| 385 | }; |
| 386 | } |
| 387 | |
| 388 | |
| 389 | /** |
| 390 | * Deserializes binary data (in protobuf wire format). |
| 391 | * @param {jspb.ByteSource} bytes The bytes to deserialize. |
| 392 | * @return {!proto.google.protobuf.FloatValue} |
| 393 | */ |
| 394 | proto.google.protobuf.FloatValue.deserializeBinary = function(bytes) { |
| 395 | var reader = new jspb.BinaryReader(bytes); |
| 396 | var msg = new proto.google.protobuf.FloatValue; |
| 397 | return proto.google.protobuf.FloatValue.deserializeBinaryFromReader(msg, reader); |
| 398 | }; |
| 399 | |
| 400 | |
| 401 | /** |
| 402 | * Deserializes binary data (in protobuf wire format) from the |
| 403 | * given reader into the given message object. |
| 404 | * @param {!proto.google.protobuf.FloatValue} msg The message object to deserialize into. |
| 405 | * @param {!jspb.BinaryReader} reader The BinaryReader to use. |
| 406 | * @return {!proto.google.protobuf.FloatValue} |
| 407 | */ |
| 408 | proto.google.protobuf.FloatValue.deserializeBinaryFromReader = function(msg, reader) { |
| 409 | while (reader.nextField()) { |
| 410 | if (reader.isEndGroup()) { |
| 411 | break; |
| 412 | } |
| 413 | var field = reader.getFieldNumber(); |
| 414 | switch (field) { |
| 415 | case 1: |
| 416 | var value = /** @type {number} */ (reader.readFloat()); |
| 417 | msg.setValue(value); |
| 418 | break; |
| 419 | default: |
| 420 | reader.skipField(); |
| 421 | break; |
| 422 | } |
| 423 | } |
| 424 | return msg; |
| 425 | }; |
| 426 | |
| 427 | |
| 428 | /** |
| 429 | * Serializes the message to binary data (in protobuf wire format). |
| 430 | * @return {!Uint8Array} |
| 431 | */ |
| 432 | proto.google.protobuf.FloatValue.prototype.serializeBinary = function() { |
| 433 | var writer = new jspb.BinaryWriter(); |
| 434 | proto.google.protobuf.FloatValue.serializeBinaryToWriter(this, writer); |
| 435 | return writer.getResultBuffer(); |
| 436 | }; |
| 437 | |
| 438 | |
| 439 | /** |
| 440 | * Serializes the given message to binary data (in protobuf wire |
| 441 | * format), writing to the given BinaryWriter. |
| 442 | * @param {!proto.google.protobuf.FloatValue} message |
| 443 | * @param {!jspb.BinaryWriter} writer |
| 444 | * @suppress {unusedLocalVariables} f is only used for nested messages |
| 445 | */ |
| 446 | proto.google.protobuf.FloatValue.serializeBinaryToWriter = function(message, writer) { |
| 447 | var f = undefined; |
| 448 | f = message.getValue(); |
| 449 | if (f !== 0.0) { |
| 450 | writer.writeFloat( |
| 451 | 1, |
| 452 | f |
| 453 | ); |
| 454 | } |
| 455 | }; |
| 456 | |
| 457 | |
| 458 | /** |
| 459 | * optional float value = 1; |
| 460 | * @return {number} |
| 461 | */ |
| 462 | proto.google.protobuf.FloatValue.prototype.getValue = function() { |
| 463 | return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); |
| 464 | }; |
| 465 | |
| 466 | |
| 467 | /** |
| 468 | * @param {number} value |
| 469 | * @return {!proto.google.protobuf.FloatValue} returns this |
| 470 | */ |
| 471 | proto.google.protobuf.FloatValue.prototype.setValue = function(value) { |
| 472 | return jspb.Message.setProto3FloatField(this, 1, value); |
| 473 | }; |
| 474 | |
| 475 | |
| 476 | |
| 477 | |
| 478 | |
| 479 | if (jspb.Message.GENERATE_TO_OBJECT) { |
| 480 | /** |
| 481 | * Creates an object representation of this proto. |
| 482 | * Field names that are reserved in JavaScript and will be renamed to pb_name. |
| 483 | * Optional fields that are not set will be set to undefined. |
| 484 | * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. |
| 485 | * For the list of reserved names please see: |
| 486 | * net/proto2/compiler/js/internal/generator.cc#kKeyword. |
| 487 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the |
| 488 | * JSPB instance for transitional soy proto support: |
| 489 | * http://goto/soy-param-migration |
| 490 | * @return {!Object} |
| 491 | */ |
| 492 | proto.google.protobuf.Int64Value.prototype.toObject = function(opt_includeInstance) { |
| 493 | return proto.google.protobuf.Int64Value.toObject(opt_includeInstance, this); |
| 494 | }; |
| 495 | |
| 496 | |
| 497 | /** |
| 498 | * Static version of the {@see toObject} method. |
| 499 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include |
| 500 | * the JSPB instance for transitional soy proto support: |
| 501 | * http://goto/soy-param-migration |
| 502 | * @param {!proto.google.protobuf.Int64Value} msg The msg instance to transform. |
| 503 | * @return {!Object} |
| 504 | * @suppress {unusedLocalVariables} f is only used for nested messages |
| 505 | */ |
| 506 | proto.google.protobuf.Int64Value.toObject = function(includeInstance, msg) { |
| 507 | var f, obj = { |
| 508 | value: jspb.Message.getFieldWithDefault(msg, 1, 0) |
| 509 | }; |
| 510 | |
| 511 | if (includeInstance) { |
| 512 | obj.$jspbMessageInstance = msg; |
| 513 | } |
| 514 | return obj; |
| 515 | }; |
| 516 | } |
| 517 | |
| 518 | |
| 519 | /** |
| 520 | * Deserializes binary data (in protobuf wire format). |
| 521 | * @param {jspb.ByteSource} bytes The bytes to deserialize. |
| 522 | * @return {!proto.google.protobuf.Int64Value} |
| 523 | */ |
| 524 | proto.google.protobuf.Int64Value.deserializeBinary = function(bytes) { |
| 525 | var reader = new jspb.BinaryReader(bytes); |
| 526 | var msg = new proto.google.protobuf.Int64Value; |
| 527 | return proto.google.protobuf.Int64Value.deserializeBinaryFromReader(msg, reader); |
| 528 | }; |
| 529 | |
| 530 | |
| 531 | /** |
| 532 | * Deserializes binary data (in protobuf wire format) from the |
| 533 | * given reader into the given message object. |
| 534 | * @param {!proto.google.protobuf.Int64Value} msg The message object to deserialize into. |
| 535 | * @param {!jspb.BinaryReader} reader The BinaryReader to use. |
| 536 | * @return {!proto.google.protobuf.Int64Value} |
| 537 | */ |
| 538 | proto.google.protobuf.Int64Value.deserializeBinaryFromReader = function(msg, reader) { |
| 539 | while (reader.nextField()) { |
| 540 | if (reader.isEndGroup()) { |
| 541 | break; |
| 542 | } |
| 543 | var field = reader.getFieldNumber(); |
| 544 | switch (field) { |
| 545 | case 1: |
| 546 | var value = /** @type {number} */ (reader.readInt64()); |
| 547 | msg.setValue(value); |
| 548 | break; |
| 549 | default: |
| 550 | reader.skipField(); |
| 551 | break; |
| 552 | } |
| 553 | } |
| 554 | return msg; |
| 555 | }; |
| 556 | |
| 557 | |
| 558 | /** |
| 559 | * Serializes the message to binary data (in protobuf wire format). |
| 560 | * @return {!Uint8Array} |
| 561 | */ |
| 562 | proto.google.protobuf.Int64Value.prototype.serializeBinary = function() { |
| 563 | var writer = new jspb.BinaryWriter(); |
| 564 | proto.google.protobuf.Int64Value.serializeBinaryToWriter(this, writer); |
| 565 | return writer.getResultBuffer(); |
| 566 | }; |
| 567 | |
| 568 | |
| 569 | /** |
| 570 | * Serializes the given message to binary data (in protobuf wire |
| 571 | * format), writing to the given BinaryWriter. |
| 572 | * @param {!proto.google.protobuf.Int64Value} message |
| 573 | * @param {!jspb.BinaryWriter} writer |
| 574 | * @suppress {unusedLocalVariables} f is only used for nested messages |
| 575 | */ |
| 576 | proto.google.protobuf.Int64Value.serializeBinaryToWriter = function(message, writer) { |
| 577 | var f = undefined; |
| 578 | f = message.getValue(); |
| 579 | if (f !== 0) { |
| 580 | writer.writeInt64( |
| 581 | 1, |
| 582 | f |
| 583 | ); |
| 584 | } |
| 585 | }; |
| 586 | |
| 587 | |
| 588 | /** |
| 589 | * optional int64 value = 1; |
| 590 | * @return {number} |
| 591 | */ |
| 592 | proto.google.protobuf.Int64Value.prototype.getValue = function() { |
| 593 | return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); |
| 594 | }; |
| 595 | |
| 596 | |
| 597 | /** |
| 598 | * @param {number} value |
| 599 | * @return {!proto.google.protobuf.Int64Value} returns this |
| 600 | */ |
| 601 | proto.google.protobuf.Int64Value.prototype.setValue = function(value) { |
| 602 | return jspb.Message.setProto3IntField(this, 1, value); |
| 603 | }; |
| 604 | |
| 605 | |
| 606 | |
| 607 | |
| 608 | |
| 609 | if (jspb.Message.GENERATE_TO_OBJECT) { |
| 610 | /** |
| 611 | * Creates an object representation of this proto. |
| 612 | * Field names that are reserved in JavaScript and will be renamed to pb_name. |
| 613 | * Optional fields that are not set will be set to undefined. |
| 614 | * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. |
| 615 | * For the list of reserved names please see: |
| 616 | * net/proto2/compiler/js/internal/generator.cc#kKeyword. |
| 617 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the |
| 618 | * JSPB instance for transitional soy proto support: |
| 619 | * http://goto/soy-param-migration |
| 620 | * @return {!Object} |
| 621 | */ |
| 622 | proto.google.protobuf.UInt64Value.prototype.toObject = function(opt_includeInstance) { |
| 623 | return proto.google.protobuf.UInt64Value.toObject(opt_includeInstance, this); |
| 624 | }; |
| 625 | |
| 626 | |
| 627 | /** |
| 628 | * Static version of the {@see toObject} method. |
| 629 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include |
| 630 | * the JSPB instance for transitional soy proto support: |
| 631 | * http://goto/soy-param-migration |
| 632 | * @param {!proto.google.protobuf.UInt64Value} msg The msg instance to transform. |
| 633 | * @return {!Object} |
| 634 | * @suppress {unusedLocalVariables} f is only used for nested messages |
| 635 | */ |
| 636 | proto.google.protobuf.UInt64Value.toObject = function(includeInstance, msg) { |
| 637 | var f, obj = { |
| 638 | value: jspb.Message.getFieldWithDefault(msg, 1, 0) |
| 639 | }; |
| 640 | |
| 641 | if (includeInstance) { |
| 642 | obj.$jspbMessageInstance = msg; |
| 643 | } |
| 644 | return obj; |
| 645 | }; |
| 646 | } |
| 647 | |
| 648 | |
| 649 | /** |
| 650 | * Deserializes binary data (in protobuf wire format). |
| 651 | * @param {jspb.ByteSource} bytes The bytes to deserialize. |
| 652 | * @return {!proto.google.protobuf.UInt64Value} |
| 653 | */ |
| 654 | proto.google.protobuf.UInt64Value.deserializeBinary = function(bytes) { |
| 655 | var reader = new jspb.BinaryReader(bytes); |
| 656 | var msg = new proto.google.protobuf.UInt64Value; |
| 657 | return proto.google.protobuf.UInt64Value.deserializeBinaryFromReader(msg, reader); |
| 658 | }; |
| 659 | |
| 660 | |
| 661 | /** |
| 662 | * Deserializes binary data (in protobuf wire format) from the |
| 663 | * given reader into the given message object. |
| 664 | * @param {!proto.google.protobuf.UInt64Value} msg The message object to deserialize into. |
| 665 | * @param {!jspb.BinaryReader} reader The BinaryReader to use. |
| 666 | * @return {!proto.google.protobuf.UInt64Value} |
| 667 | */ |
| 668 | proto.google.protobuf.UInt64Value.deserializeBinaryFromReader = function(msg, reader) { |
| 669 | while (reader.nextField()) { |
| 670 | if (reader.isEndGroup()) { |
| 671 | break; |
| 672 | } |
| 673 | var field = reader.getFieldNumber(); |
| 674 | switch (field) { |
| 675 | case 1: |
| 676 | var value = /** @type {number} */ (reader.readUint64()); |
| 677 | msg.setValue(value); |
| 678 | break; |
| 679 | default: |
| 680 | reader.skipField(); |
| 681 | break; |
| 682 | } |
| 683 | } |
| 684 | return msg; |
| 685 | }; |
| 686 | |
| 687 | |
| 688 | /** |
| 689 | * Serializes the message to binary data (in protobuf wire format). |
| 690 | * @return {!Uint8Array} |
| 691 | */ |
| 692 | proto.google.protobuf.UInt64Value.prototype.serializeBinary = function() { |
| 693 | var writer = new jspb.BinaryWriter(); |
| 694 | proto.google.protobuf.UInt64Value.serializeBinaryToWriter(this, writer); |
| 695 | return writer.getResultBuffer(); |
| 696 | }; |
| 697 | |
| 698 | |
| 699 | /** |
| 700 | * Serializes the given message to binary data (in protobuf wire |
| 701 | * format), writing to the given BinaryWriter. |
| 702 | * @param {!proto.google.protobuf.UInt64Value} message |
| 703 | * @param {!jspb.BinaryWriter} writer |
| 704 | * @suppress {unusedLocalVariables} f is only used for nested messages |
| 705 | */ |
| 706 | proto.google.protobuf.UInt64Value.serializeBinaryToWriter = function(message, writer) { |
| 707 | var f = undefined; |
| 708 | f = message.getValue(); |
| 709 | if (f !== 0) { |
| 710 | writer.writeUint64( |
| 711 | 1, |
| 712 | f |
| 713 | ); |
| 714 | } |
| 715 | }; |
| 716 | |
| 717 | |
| 718 | /** |
| 719 | * optional uint64 value = 1; |
| 720 | * @return {number} |
| 721 | */ |
| 722 | proto.google.protobuf.UInt64Value.prototype.getValue = function() { |
| 723 | return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); |
| 724 | }; |
| 725 | |
| 726 | |
| 727 | /** |
| 728 | * @param {number} value |
| 729 | * @return {!proto.google.protobuf.UInt64Value} returns this |
| 730 | */ |
| 731 | proto.google.protobuf.UInt64Value.prototype.setValue = function(value) { |
| 732 | return jspb.Message.setProto3IntField(this, 1, value); |
| 733 | }; |
| 734 | |
| 735 | |
| 736 | |
| 737 | |
| 738 | |
| 739 | if (jspb.Message.GENERATE_TO_OBJECT) { |
| 740 | /** |
| 741 | * Creates an object representation of this proto. |
| 742 | * Field names that are reserved in JavaScript and will be renamed to pb_name. |
| 743 | * Optional fields that are not set will be set to undefined. |
| 744 | * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. |
| 745 | * For the list of reserved names please see: |
| 746 | * net/proto2/compiler/js/internal/generator.cc#kKeyword. |
| 747 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the |
| 748 | * JSPB instance for transitional soy proto support: |
| 749 | * http://goto/soy-param-migration |
| 750 | * @return {!Object} |
| 751 | */ |
| 752 | proto.google.protobuf.Int32Value.prototype.toObject = function(opt_includeInstance) { |
| 753 | return proto.google.protobuf.Int32Value.toObject(opt_includeInstance, this); |
| 754 | }; |
| 755 | |
| 756 | |
| 757 | /** |
| 758 | * Static version of the {@see toObject} method. |
| 759 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include |
| 760 | * the JSPB instance for transitional soy proto support: |
| 761 | * http://goto/soy-param-migration |
| 762 | * @param {!proto.google.protobuf.Int32Value} msg The msg instance to transform. |
| 763 | * @return {!Object} |
| 764 | * @suppress {unusedLocalVariables} f is only used for nested messages |
| 765 | */ |
| 766 | proto.google.protobuf.Int32Value.toObject = function(includeInstance, msg) { |
| 767 | var f, obj = { |
| 768 | value: jspb.Message.getFieldWithDefault(msg, 1, 0) |
| 769 | }; |
| 770 | |
| 771 | if (includeInstance) { |
| 772 | obj.$jspbMessageInstance = msg; |
| 773 | } |
| 774 | return obj; |
| 775 | }; |
| 776 | } |
| 777 | |
| 778 | |
| 779 | /** |
| 780 | * Deserializes binary data (in protobuf wire format). |
| 781 | * @param {jspb.ByteSource} bytes The bytes to deserialize. |
| 782 | * @return {!proto.google.protobuf.Int32Value} |
| 783 | */ |
| 784 | proto.google.protobuf.Int32Value.deserializeBinary = function(bytes) { |
| 785 | var reader = new jspb.BinaryReader(bytes); |
| 786 | var msg = new proto.google.protobuf.Int32Value; |
| 787 | return proto.google.protobuf.Int32Value.deserializeBinaryFromReader(msg, reader); |
| 788 | }; |
| 789 | |
| 790 | |
| 791 | /** |
| 792 | * Deserializes binary data (in protobuf wire format) from the |
| 793 | * given reader into the given message object. |
| 794 | * @param {!proto.google.protobuf.Int32Value} msg The message object to deserialize into. |
| 795 | * @param {!jspb.BinaryReader} reader The BinaryReader to use. |
| 796 | * @return {!proto.google.protobuf.Int32Value} |
| 797 | */ |
| 798 | proto.google.protobuf.Int32Value.deserializeBinaryFromReader = function(msg, reader) { |
| 799 | while (reader.nextField()) { |
| 800 | if (reader.isEndGroup()) { |
| 801 | break; |
| 802 | } |
| 803 | var field = reader.getFieldNumber(); |
| 804 | switch (field) { |
| 805 | case 1: |
| 806 | var value = /** @type {number} */ (reader.readInt32()); |
| 807 | msg.setValue(value); |
| 808 | break; |
| 809 | default: |
| 810 | reader.skipField(); |
| 811 | break; |
| 812 | } |
| 813 | } |
| 814 | return msg; |
| 815 | }; |
| 816 | |
| 817 | |
| 818 | /** |
| 819 | * Serializes the message to binary data (in protobuf wire format). |
| 820 | * @return {!Uint8Array} |
| 821 | */ |
| 822 | proto.google.protobuf.Int32Value.prototype.serializeBinary = function() { |
| 823 | var writer = new jspb.BinaryWriter(); |
| 824 | proto.google.protobuf.Int32Value.serializeBinaryToWriter(this, writer); |
| 825 | return writer.getResultBuffer(); |
| 826 | }; |
| 827 | |
| 828 | |
| 829 | /** |
| 830 | * Serializes the given message to binary data (in protobuf wire |
| 831 | * format), writing to the given BinaryWriter. |
| 832 | * @param {!proto.google.protobuf.Int32Value} message |
| 833 | * @param {!jspb.BinaryWriter} writer |
| 834 | * @suppress {unusedLocalVariables} f is only used for nested messages |
| 835 | */ |
| 836 | proto.google.protobuf.Int32Value.serializeBinaryToWriter = function(message, writer) { |
| 837 | var f = undefined; |
| 838 | f = message.getValue(); |
| 839 | if (f !== 0) { |
| 840 | writer.writeInt32( |
| 841 | 1, |
| 842 | f |
| 843 | ); |
| 844 | } |
| 845 | }; |
| 846 | |
| 847 | |
| 848 | /** |
| 849 | * optional int32 value = 1; |
| 850 | * @return {number} |
| 851 | */ |
| 852 | proto.google.protobuf.Int32Value.prototype.getValue = function() { |
| 853 | return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); |
| 854 | }; |
| 855 | |
| 856 | |
| 857 | /** |
| 858 | * @param {number} value |
| 859 | * @return {!proto.google.protobuf.Int32Value} returns this |
| 860 | */ |
| 861 | proto.google.protobuf.Int32Value.prototype.setValue = function(value) { |
| 862 | return jspb.Message.setProto3IntField(this, 1, value); |
| 863 | }; |
| 864 | |
| 865 | |
| 866 | |
| 867 | |
| 868 | |
| 869 | if (jspb.Message.GENERATE_TO_OBJECT) { |
| 870 | /** |
| 871 | * Creates an object representation of this proto. |
| 872 | * Field names that are reserved in JavaScript and will be renamed to pb_name. |
| 873 | * Optional fields that are not set will be set to undefined. |
| 874 | * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. |
| 875 | * For the list of reserved names please see: |
| 876 | * net/proto2/compiler/js/internal/generator.cc#kKeyword. |
| 877 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the |
| 878 | * JSPB instance for transitional soy proto support: |
| 879 | * http://goto/soy-param-migration |
| 880 | * @return {!Object} |
| 881 | */ |
| 882 | proto.google.protobuf.UInt32Value.prototype.toObject = function(opt_includeInstance) { |
| 883 | return proto.google.protobuf.UInt32Value.toObject(opt_includeInstance, this); |
| 884 | }; |
| 885 | |
| 886 | |
| 887 | /** |
| 888 | * Static version of the {@see toObject} method. |
| 889 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include |
| 890 | * the JSPB instance for transitional soy proto support: |
| 891 | * http://goto/soy-param-migration |
| 892 | * @param {!proto.google.protobuf.UInt32Value} msg The msg instance to transform. |
| 893 | * @return {!Object} |
| 894 | * @suppress {unusedLocalVariables} f is only used for nested messages |
| 895 | */ |
| 896 | proto.google.protobuf.UInt32Value.toObject = function(includeInstance, msg) { |
| 897 | var f, obj = { |
| 898 | value: jspb.Message.getFieldWithDefault(msg, 1, 0) |
| 899 | }; |
| 900 | |
| 901 | if (includeInstance) { |
| 902 | obj.$jspbMessageInstance = msg; |
| 903 | } |
| 904 | return obj; |
| 905 | }; |
| 906 | } |
| 907 | |
| 908 | |
| 909 | /** |
| 910 | * Deserializes binary data (in protobuf wire format). |
| 911 | * @param {jspb.ByteSource} bytes The bytes to deserialize. |
| 912 | * @return {!proto.google.protobuf.UInt32Value} |
| 913 | */ |
| 914 | proto.google.protobuf.UInt32Value.deserializeBinary = function(bytes) { |
| 915 | var reader = new jspb.BinaryReader(bytes); |
| 916 | var msg = new proto.google.protobuf.UInt32Value; |
| 917 | return proto.google.protobuf.UInt32Value.deserializeBinaryFromReader(msg, reader); |
| 918 | }; |
| 919 | |
| 920 | |
| 921 | /** |
| 922 | * Deserializes binary data (in protobuf wire format) from the |
| 923 | * given reader into the given message object. |
| 924 | * @param {!proto.google.protobuf.UInt32Value} msg The message object to deserialize into. |
| 925 | * @param {!jspb.BinaryReader} reader The BinaryReader to use. |
| 926 | * @return {!proto.google.protobuf.UInt32Value} |
| 927 | */ |
| 928 | proto.google.protobuf.UInt32Value.deserializeBinaryFromReader = function(msg, reader) { |
| 929 | while (reader.nextField()) { |
| 930 | if (reader.isEndGroup()) { |
| 931 | break; |
| 932 | } |
| 933 | var field = reader.getFieldNumber(); |
| 934 | switch (field) { |
| 935 | case 1: |
| 936 | var value = /** @type {number} */ (reader.readUint32()); |
| 937 | msg.setValue(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.protobuf.UInt32Value.prototype.serializeBinary = function() { |
| 953 | var writer = new jspb.BinaryWriter(); |
| 954 | proto.google.protobuf.UInt32Value.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.protobuf.UInt32Value} message |
| 963 | * @param {!jspb.BinaryWriter} writer |
| 964 | * @suppress {unusedLocalVariables} f is only used for nested messages |
| 965 | */ |
| 966 | proto.google.protobuf.UInt32Value.serializeBinaryToWriter = function(message, writer) { |
| 967 | var f = undefined; |
| 968 | f = message.getValue(); |
| 969 | if (f !== 0) { |
| 970 | writer.writeUint32( |
| 971 | 1, |
| 972 | f |
| 973 | ); |
| 974 | } |
| 975 | }; |
| 976 | |
| 977 | |
| 978 | /** |
| 979 | * optional uint32 value = 1; |
| 980 | * @return {number} |
| 981 | */ |
| 982 | proto.google.protobuf.UInt32Value.prototype.getValue = function() { |
| 983 | return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); |
| 984 | }; |
| 985 | |
| 986 | |
| 987 | /** |
| 988 | * @param {number} value |
| 989 | * @return {!proto.google.protobuf.UInt32Value} returns this |
| 990 | */ |
| 991 | proto.google.protobuf.UInt32Value.prototype.setValue = function(value) { |
| 992 | return jspb.Message.setProto3IntField(this, 1, value); |
| 993 | }; |
| 994 | |
| 995 | |
| 996 | |
| 997 | |
| 998 | |
| 999 | if (jspb.Message.GENERATE_TO_OBJECT) { |
| 1000 | /** |
| 1001 | * Creates an object representation of this proto. |
| 1002 | * Field names that are reserved in JavaScript and will be renamed to pb_name. |
| 1003 | * Optional fields that are not set will be set to undefined. |
| 1004 | * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. |
| 1005 | * For the list of reserved names please see: |
| 1006 | * net/proto2/compiler/js/internal/generator.cc#kKeyword. |
| 1007 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the |
| 1008 | * JSPB instance for transitional soy proto support: |
| 1009 | * http://goto/soy-param-migration |
| 1010 | * @return {!Object} |
| 1011 | */ |
| 1012 | proto.google.protobuf.BoolValue.prototype.toObject = function(opt_includeInstance) { |
| 1013 | return proto.google.protobuf.BoolValue.toObject(opt_includeInstance, this); |
| 1014 | }; |
| 1015 | |
| 1016 | |
| 1017 | /** |
| 1018 | * Static version of the {@see toObject} method. |
| 1019 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include |
| 1020 | * the JSPB instance for transitional soy proto support: |
| 1021 | * http://goto/soy-param-migration |
| 1022 | * @param {!proto.google.protobuf.BoolValue} msg The msg instance to transform. |
| 1023 | * @return {!Object} |
| 1024 | * @suppress {unusedLocalVariables} f is only used for nested messages |
| 1025 | */ |
| 1026 | proto.google.protobuf.BoolValue.toObject = function(includeInstance, msg) { |
| 1027 | var f, obj = { |
| 1028 | value: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) |
| 1029 | }; |
| 1030 | |
| 1031 | if (includeInstance) { |
| 1032 | obj.$jspbMessageInstance = msg; |
| 1033 | } |
| 1034 | return obj; |
| 1035 | }; |
| 1036 | } |
| 1037 | |
| 1038 | |
| 1039 | /** |
| 1040 | * Deserializes binary data (in protobuf wire format). |
| 1041 | * @param {jspb.ByteSource} bytes The bytes to deserialize. |
| 1042 | * @return {!proto.google.protobuf.BoolValue} |
| 1043 | */ |
| 1044 | proto.google.protobuf.BoolValue.deserializeBinary = function(bytes) { |
| 1045 | var reader = new jspb.BinaryReader(bytes); |
| 1046 | var msg = new proto.google.protobuf.BoolValue; |
| 1047 | return proto.google.protobuf.BoolValue.deserializeBinaryFromReader(msg, reader); |
| 1048 | }; |
| 1049 | |
| 1050 | |
| 1051 | /** |
| 1052 | * Deserializes binary data (in protobuf wire format) from the |
| 1053 | * given reader into the given message object. |
| 1054 | * @param {!proto.google.protobuf.BoolValue} msg The message object to deserialize into. |
| 1055 | * @param {!jspb.BinaryReader} reader The BinaryReader to use. |
| 1056 | * @return {!proto.google.protobuf.BoolValue} |
| 1057 | */ |
| 1058 | proto.google.protobuf.BoolValue.deserializeBinaryFromReader = function(msg, reader) { |
| 1059 | while (reader.nextField()) { |
| 1060 | if (reader.isEndGroup()) { |
| 1061 | break; |
| 1062 | } |
| 1063 | var field = reader.getFieldNumber(); |
| 1064 | switch (field) { |
| 1065 | case 1: |
| 1066 | var value = /** @type {boolean} */ (reader.readBool()); |
| 1067 | msg.setValue(value); |
| 1068 | break; |
| 1069 | default: |
| 1070 | reader.skipField(); |
| 1071 | break; |
| 1072 | } |
| 1073 | } |
| 1074 | return msg; |
| 1075 | }; |
| 1076 | |
| 1077 | |
| 1078 | /** |
| 1079 | * Serializes the message to binary data (in protobuf wire format). |
| 1080 | * @return {!Uint8Array} |
| 1081 | */ |
| 1082 | proto.google.protobuf.BoolValue.prototype.serializeBinary = function() { |
| 1083 | var writer = new jspb.BinaryWriter(); |
| 1084 | proto.google.protobuf.BoolValue.serializeBinaryToWriter(this, writer); |
| 1085 | return writer.getResultBuffer(); |
| 1086 | }; |
| 1087 | |
| 1088 | |
| 1089 | /** |
| 1090 | * Serializes the given message to binary data (in protobuf wire |
| 1091 | * format), writing to the given BinaryWriter. |
| 1092 | * @param {!proto.google.protobuf.BoolValue} message |
| 1093 | * @param {!jspb.BinaryWriter} writer |
| 1094 | * @suppress {unusedLocalVariables} f is only used for nested messages |
| 1095 | */ |
| 1096 | proto.google.protobuf.BoolValue.serializeBinaryToWriter = function(message, writer) { |
| 1097 | var f = undefined; |
| 1098 | f = message.getValue(); |
| 1099 | if (f) { |
| 1100 | writer.writeBool( |
| 1101 | 1, |
| 1102 | f |
| 1103 | ); |
| 1104 | } |
| 1105 | }; |
| 1106 | |
| 1107 | |
| 1108 | /** |
| 1109 | * optional bool value = 1; |
| 1110 | * @return {boolean} |
| 1111 | */ |
| 1112 | proto.google.protobuf.BoolValue.prototype.getValue = function() { |
| 1113 | return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); |
| 1114 | }; |
| 1115 | |
| 1116 | |
| 1117 | /** |
| 1118 | * @param {boolean} value |
| 1119 | * @return {!proto.google.protobuf.BoolValue} returns this |
| 1120 | */ |
| 1121 | proto.google.protobuf.BoolValue.prototype.setValue = function(value) { |
| 1122 | return jspb.Message.setProto3BooleanField(this, 1, value); |
| 1123 | }; |
| 1124 | |
| 1125 | |
| 1126 | |
| 1127 | |
| 1128 | |
| 1129 | if (jspb.Message.GENERATE_TO_OBJECT) { |
| 1130 | /** |
| 1131 | * Creates an object representation of this proto. |
| 1132 | * Field names that are reserved in JavaScript and will be renamed to pb_name. |
| 1133 | * Optional fields that are not set will be set to undefined. |
| 1134 | * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. |
| 1135 | * For the list of reserved names please see: |
| 1136 | * net/proto2/compiler/js/internal/generator.cc#kKeyword. |
| 1137 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the |
| 1138 | * JSPB instance for transitional soy proto support: |
| 1139 | * http://goto/soy-param-migration |
| 1140 | * @return {!Object} |
| 1141 | */ |
| 1142 | proto.google.protobuf.StringValue.prototype.toObject = function(opt_includeInstance) { |
| 1143 | return proto.google.protobuf.StringValue.toObject(opt_includeInstance, this); |
| 1144 | }; |
| 1145 | |
| 1146 | |
| 1147 | /** |
| 1148 | * Static version of the {@see toObject} method. |
| 1149 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include |
| 1150 | * the JSPB instance for transitional soy proto support: |
| 1151 | * http://goto/soy-param-migration |
| 1152 | * @param {!proto.google.protobuf.StringValue} msg The msg instance to transform. |
| 1153 | * @return {!Object} |
| 1154 | * @suppress {unusedLocalVariables} f is only used for nested messages |
| 1155 | */ |
| 1156 | proto.google.protobuf.StringValue.toObject = function(includeInstance, msg) { |
| 1157 | var f, obj = { |
| 1158 | value: jspb.Message.getFieldWithDefault(msg, 1, "") |
| 1159 | }; |
| 1160 | |
| 1161 | if (includeInstance) { |
| 1162 | obj.$jspbMessageInstance = msg; |
| 1163 | } |
| 1164 | return obj; |
| 1165 | }; |
| 1166 | } |
| 1167 | |
| 1168 | |
| 1169 | /** |
| 1170 | * Deserializes binary data (in protobuf wire format). |
| 1171 | * @param {jspb.ByteSource} bytes The bytes to deserialize. |
| 1172 | * @return {!proto.google.protobuf.StringValue} |
| 1173 | */ |
| 1174 | proto.google.protobuf.StringValue.deserializeBinary = function(bytes) { |
| 1175 | var reader = new jspb.BinaryReader(bytes); |
| 1176 | var msg = new proto.google.protobuf.StringValue; |
| 1177 | return proto.google.protobuf.StringValue.deserializeBinaryFromReader(msg, reader); |
| 1178 | }; |
| 1179 | |
| 1180 | |
| 1181 | /** |
| 1182 | * Deserializes binary data (in protobuf wire format) from the |
| 1183 | * given reader into the given message object. |
| 1184 | * @param {!proto.google.protobuf.StringValue} msg The message object to deserialize into. |
| 1185 | * @param {!jspb.BinaryReader} reader The BinaryReader to use. |
| 1186 | * @return {!proto.google.protobuf.StringValue} |
| 1187 | */ |
| 1188 | proto.google.protobuf.StringValue.deserializeBinaryFromReader = function(msg, reader) { |
| 1189 | while (reader.nextField()) { |
| 1190 | if (reader.isEndGroup()) { |
| 1191 | break; |
| 1192 | } |
| 1193 | var field = reader.getFieldNumber(); |
| 1194 | switch (field) { |
| 1195 | case 1: |
| 1196 | var value = /** @type {string} */ (reader.readString()); |
| 1197 | msg.setValue(value); |
| 1198 | break; |
| 1199 | default: |
| 1200 | reader.skipField(); |
| 1201 | break; |
| 1202 | } |
| 1203 | } |
| 1204 | return msg; |
| 1205 | }; |
| 1206 | |
| 1207 | |
| 1208 | /** |
| 1209 | * Serializes the message to binary data (in protobuf wire format). |
| 1210 | * @return {!Uint8Array} |
| 1211 | */ |
| 1212 | proto.google.protobuf.StringValue.prototype.serializeBinary = function() { |
| 1213 | var writer = new jspb.BinaryWriter(); |
| 1214 | proto.google.protobuf.StringValue.serializeBinaryToWriter(this, writer); |
| 1215 | return writer.getResultBuffer(); |
| 1216 | }; |
| 1217 | |
| 1218 | |
| 1219 | /** |
| 1220 | * Serializes the given message to binary data (in protobuf wire |
| 1221 | * format), writing to the given BinaryWriter. |
| 1222 | * @param {!proto.google.protobuf.StringValue} message |
| 1223 | * @param {!jspb.BinaryWriter} writer |
| 1224 | * @suppress {unusedLocalVariables} f is only used for nested messages |
| 1225 | */ |
| 1226 | proto.google.protobuf.StringValue.serializeBinaryToWriter = function(message, writer) { |
| 1227 | var f = undefined; |
| 1228 | f = message.getValue(); |
| 1229 | if (f.length > 0) { |
| 1230 | writer.writeString( |
| 1231 | 1, |
| 1232 | f |
| 1233 | ); |
| 1234 | } |
| 1235 | }; |
| 1236 | |
| 1237 | |
| 1238 | /** |
| 1239 | * optional string value = 1; |
| 1240 | * @return {string} |
| 1241 | */ |
| 1242 | proto.google.protobuf.StringValue.prototype.getValue = function() { |
| 1243 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); |
| 1244 | }; |
| 1245 | |
| 1246 | |
| 1247 | /** |
| 1248 | * @param {string} value |
| 1249 | * @return {!proto.google.protobuf.StringValue} returns this |
| 1250 | */ |
| 1251 | proto.google.protobuf.StringValue.prototype.setValue = function(value) { |
| 1252 | return jspb.Message.setProto3StringField(this, 1, value); |
| 1253 | }; |
| 1254 | |
| 1255 | |
| 1256 | |
| 1257 | |
| 1258 | |
| 1259 | if (jspb.Message.GENERATE_TO_OBJECT) { |
| 1260 | /** |
| 1261 | * Creates an object representation of this proto. |
| 1262 | * Field names that are reserved in JavaScript and will be renamed to pb_name. |
| 1263 | * Optional fields that are not set will be set to undefined. |
| 1264 | * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. |
| 1265 | * For the list of reserved names please see: |
| 1266 | * net/proto2/compiler/js/internal/generator.cc#kKeyword. |
| 1267 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the |
| 1268 | * JSPB instance for transitional soy proto support: |
| 1269 | * http://goto/soy-param-migration |
| 1270 | * @return {!Object} |
| 1271 | */ |
| 1272 | proto.google.protobuf.BytesValue.prototype.toObject = function(opt_includeInstance) { |
| 1273 | return proto.google.protobuf.BytesValue.toObject(opt_includeInstance, this); |
| 1274 | }; |
| 1275 | |
| 1276 | |
| 1277 | /** |
| 1278 | * Static version of the {@see toObject} method. |
| 1279 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include |
| 1280 | * the JSPB instance for transitional soy proto support: |
| 1281 | * http://goto/soy-param-migration |
| 1282 | * @param {!proto.google.protobuf.BytesValue} msg The msg instance to transform. |
| 1283 | * @return {!Object} |
| 1284 | * @suppress {unusedLocalVariables} f is only used for nested messages |
| 1285 | */ |
| 1286 | proto.google.protobuf.BytesValue.toObject = function(includeInstance, msg) { |
| 1287 | var f, obj = { |
| 1288 | value: msg.getValue_asB64() |
| 1289 | }; |
| 1290 | |
| 1291 | if (includeInstance) { |
| 1292 | obj.$jspbMessageInstance = msg; |
| 1293 | } |
| 1294 | return obj; |
| 1295 | }; |
| 1296 | } |
| 1297 | |
| 1298 | |
| 1299 | /** |
| 1300 | * Deserializes binary data (in protobuf wire format). |
| 1301 | * @param {jspb.ByteSource} bytes The bytes to deserialize. |
| 1302 | * @return {!proto.google.protobuf.BytesValue} |
| 1303 | */ |
| 1304 | proto.google.protobuf.BytesValue.deserializeBinary = function(bytes) { |
| 1305 | var reader = new jspb.BinaryReader(bytes); |
| 1306 | var msg = new proto.google.protobuf.BytesValue; |
| 1307 | return proto.google.protobuf.BytesValue.deserializeBinaryFromReader(msg, reader); |
| 1308 | }; |
| 1309 | |
| 1310 | |
| 1311 | /** |
| 1312 | * Deserializes binary data (in protobuf wire format) from the |
| 1313 | * given reader into the given message object. |
| 1314 | * @param {!proto.google.protobuf.BytesValue} msg The message object to deserialize into. |
| 1315 | * @param {!jspb.BinaryReader} reader The BinaryReader to use. |
| 1316 | * @return {!proto.google.protobuf.BytesValue} |
| 1317 | */ |
| 1318 | proto.google.protobuf.BytesValue.deserializeBinaryFromReader = function(msg, reader) { |
| 1319 | while (reader.nextField()) { |
| 1320 | if (reader.isEndGroup()) { |
| 1321 | break; |
| 1322 | } |
| 1323 | var field = reader.getFieldNumber(); |
| 1324 | switch (field) { |
| 1325 | case 1: |
| 1326 | var value = /** @type {!Uint8Array} */ (reader.readBytes()); |
| 1327 | msg.setValue(value); |
| 1328 | break; |
| 1329 | default: |
| 1330 | reader.skipField(); |
| 1331 | break; |
| 1332 | } |
| 1333 | } |
| 1334 | return msg; |
| 1335 | }; |
| 1336 | |
| 1337 | |
| 1338 | /** |
| 1339 | * Serializes the message to binary data (in protobuf wire format). |
| 1340 | * @return {!Uint8Array} |
| 1341 | */ |
| 1342 | proto.google.protobuf.BytesValue.prototype.serializeBinary = function() { |
| 1343 | var writer = new jspb.BinaryWriter(); |
| 1344 | proto.google.protobuf.BytesValue.serializeBinaryToWriter(this, writer); |
| 1345 | return writer.getResultBuffer(); |
| 1346 | }; |
| 1347 | |
| 1348 | |
| 1349 | /** |
| 1350 | * Serializes the given message to binary data (in protobuf wire |
| 1351 | * format), writing to the given BinaryWriter. |
| 1352 | * @param {!proto.google.protobuf.BytesValue} message |
| 1353 | * @param {!jspb.BinaryWriter} writer |
| 1354 | * @suppress {unusedLocalVariables} f is only used for nested messages |
| 1355 | */ |
| 1356 | proto.google.protobuf.BytesValue.serializeBinaryToWriter = function(message, writer) { |
| 1357 | var f = undefined; |
| 1358 | f = message.getValue_asU8(); |
| 1359 | if (f.length > 0) { |
| 1360 | writer.writeBytes( |
| 1361 | 1, |
| 1362 | f |
| 1363 | ); |
| 1364 | } |
| 1365 | }; |
| 1366 | |
| 1367 | |
| 1368 | /** |
| 1369 | * optional bytes value = 1; |
| 1370 | * @return {!(string|Uint8Array)} |
| 1371 | */ |
| 1372 | proto.google.protobuf.BytesValue.prototype.getValue = function() { |
| 1373 | return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); |
| 1374 | }; |
| 1375 | |
| 1376 | |
| 1377 | /** |
| 1378 | * optional bytes value = 1; |
| 1379 | * This is a type-conversion wrapper around `getValue()` |
| 1380 | * @return {string} |
| 1381 | */ |
| 1382 | proto.google.protobuf.BytesValue.prototype.getValue_asB64 = function() { |
| 1383 | return /** @type {string} */ (jspb.Message.bytesAsB64( |
| 1384 | this.getValue())); |
| 1385 | }; |
| 1386 | |
| 1387 | |
| 1388 | /** |
| 1389 | * optional bytes value = 1; |
| 1390 | * Note that Uint8Array is not supported on all browsers. |
| 1391 | * @see http://caniuse.com/Uint8Array |
| 1392 | * This is a type-conversion wrapper around `getValue()` |
| 1393 | * @return {!Uint8Array} |
| 1394 | */ |
| 1395 | proto.google.protobuf.BytesValue.prototype.getValue_asU8 = function() { |
| 1396 | return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( |
| 1397 | this.getValue())); |
| 1398 | }; |
| 1399 | |
| 1400 | |
| 1401 | /** |
| 1402 | * @param {!(string|Uint8Array)} value |
| 1403 | * @return {!proto.google.protobuf.BytesValue} returns this |
| 1404 | */ |
| 1405 | proto.google.protobuf.BytesValue.prototype.setValue = function(value) { |
| 1406 | return jspb.Message.setProto3BytesField(this, 1, value); |
| 1407 | }; |
| 1408 | |
| 1409 | |
| 1410 | goog.object.extend(exports, proto); |