Playlist_pb.js 5.2 KB

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