Source: proto/google/protobuf/empty_pb.js

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