empty_pb.js 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. // source: google/protobuf/empty.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. var jspb = require('google-protobuf');
  14. var goog = jspb;
  15. var global =
  16. (typeof globalThis !== 'undefined' && globalThis) ||
  17. (typeof window !== 'undefined' && window) ||
  18. (typeof global !== 'undefined' && global) ||
  19. (typeof self !== 'undefined' && self) ||
  20. (function () { return this; }).call(null) ||
  21. Function('return this')();
  22. goog.exportSymbol('proto.google.protobuf.Empty', null, global);
  23. /**
  24. * Generated by JsPbCodeGenerator.
  25. * @param {Array=} opt_data Optional initial data array, typically from a
  26. * server response, or constructed directly in Javascript. The array is used
  27. * in place and becomes part of the constructed object. It is not cloned.
  28. * If no data is provided, the constructed object will be empty, but still
  29. * valid.
  30. * @extends {jspb.Message}
  31. * @constructor
  32. */
  33. proto.google.protobuf.Empty = function(opt_data) {
  34. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  35. };
  36. goog.inherits(proto.google.protobuf.Empty, jspb.Message);
  37. if (goog.DEBUG && !COMPILED) {
  38. /**
  39. * @public
  40. * @override
  41. */
  42. proto.google.protobuf.Empty.displayName = 'proto.google.protobuf.Empty';
  43. }
  44. if (jspb.Message.GENERATE_TO_OBJECT) {
  45. /**
  46. * Creates an object representation of this proto.
  47. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  48. * Optional fields that are not set will be set to undefined.
  49. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  50. * For the list of reserved names please see:
  51. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  52. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  53. * JSPB instance for transitional soy proto support:
  54. * http://goto/soy-param-migration
  55. * @return {!Object}
  56. */
  57. proto.google.protobuf.Empty.prototype.toObject = function(opt_includeInstance) {
  58. return proto.google.protobuf.Empty.toObject(opt_includeInstance, this);
  59. };
  60. /**
  61. * Static version of the {@see toObject} method.
  62. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  63. * the JSPB instance for transitional soy proto support:
  64. * http://goto/soy-param-migration
  65. * @param {!proto.google.protobuf.Empty} msg The msg instance to transform.
  66. * @return {!Object}
  67. * @suppress {unusedLocalVariables} f is only used for nested messages
  68. */
  69. proto.google.protobuf.Empty.toObject = function(includeInstance, msg) {
  70. var f, obj = {
  71. };
  72. if (includeInstance) {
  73. obj.$jspbMessageInstance = msg;
  74. }
  75. return obj;
  76. };
  77. }
  78. /**
  79. * Deserializes binary data (in protobuf wire format).
  80. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  81. * @return {!proto.google.protobuf.Empty}
  82. */
  83. proto.google.protobuf.Empty.deserializeBinary = function(bytes) {
  84. var reader = new jspb.BinaryReader(bytes);
  85. var msg = new proto.google.protobuf.Empty;
  86. return proto.google.protobuf.Empty.deserializeBinaryFromReader(msg, reader);
  87. };
  88. /**
  89. * Deserializes binary data (in protobuf wire format) from the
  90. * given reader into the given message object.
  91. * @param {!proto.google.protobuf.Empty} msg The message object to deserialize into.
  92. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  93. * @return {!proto.google.protobuf.Empty}
  94. */
  95. proto.google.protobuf.Empty.deserializeBinaryFromReader = function(msg, reader) {
  96. while (reader.nextField()) {
  97. if (reader.isEndGroup()) {
  98. break;
  99. }
  100. var field = reader.getFieldNumber();
  101. switch (field) {
  102. default:
  103. reader.skipField();
  104. break;
  105. }
  106. }
  107. return msg;
  108. };
  109. /**
  110. * Serializes the message to binary data (in protobuf wire format).
  111. * @return {!Uint8Array}
  112. */
  113. proto.google.protobuf.Empty.prototype.serializeBinary = function() {
  114. var writer = new jspb.BinaryWriter();
  115. proto.google.protobuf.Empty.serializeBinaryToWriter(this, writer);
  116. return writer.getResultBuffer();
  117. };
  118. /**
  119. * Serializes the given message to binary data (in protobuf wire
  120. * format), writing to the given BinaryWriter.
  121. * @param {!proto.google.protobuf.Empty} message
  122. * @param {!jspb.BinaryWriter} writer
  123. * @suppress {unusedLocalVariables} f is only used for nested messages
  124. */
  125. proto.google.protobuf.Empty.serializeBinaryToWriter = function(message, writer) {
  126. var f = undefined;
  127. };
  128. goog.object.extend(exports, proto.google.protobuf);