Council_pb.js 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  1. // source: proto/Council.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 = Function('return this')();
  16. goog.exportSymbol('proto.CouncilCandidacyNoteMetadata', null, global);
  17. /**
  18. * Generated by JsPbCodeGenerator.
  19. * @param {Array=} opt_data Optional initial data array, typically from a
  20. * server response, or constructed directly in Javascript. The array is used
  21. * in place and becomes part of the constructed object. It is not cloned.
  22. * If no data is provided, the constructed object will be empty, but still
  23. * valid.
  24. * @extends {jspb.Message}
  25. * @constructor
  26. */
  27. proto.CouncilCandidacyNoteMetadata = function(opt_data) {
  28. jspb.Message.initialize(this, opt_data, 0, -1, proto.CouncilCandidacyNoteMetadata.repeatedFields_, null);
  29. };
  30. goog.inherits(proto.CouncilCandidacyNoteMetadata, jspb.Message);
  31. if (goog.DEBUG && !COMPILED) {
  32. /**
  33. * @public
  34. * @override
  35. */
  36. proto.CouncilCandidacyNoteMetadata.displayName = 'proto.CouncilCandidacyNoteMetadata';
  37. }
  38. /**
  39. * List of repeated fields within this message type.
  40. * @private {!Array<number>}
  41. * @const
  42. */
  43. proto.CouncilCandidacyNoteMetadata.repeatedFields_ = [2];
  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.CouncilCandidacyNoteMetadata.prototype.toObject = function(opt_includeInstance) {
  58. return proto.CouncilCandidacyNoteMetadata.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.CouncilCandidacyNoteMetadata} msg The msg instance to transform.
  66. * @return {!Object}
  67. * @suppress {unusedLocalVariables} f is only used for nested messages
  68. */
  69. proto.CouncilCandidacyNoteMetadata.toObject = function(includeInstance, msg) {
  70. var f, obj = {
  71. header: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
  72. bulletPointsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f,
  73. coverImage: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f,
  74. description: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f
  75. };
  76. if (includeInstance) {
  77. obj.$jspbMessageInstance = msg;
  78. }
  79. return obj;
  80. };
  81. }
  82. /**
  83. * Deserializes binary data (in protobuf wire format).
  84. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  85. * @return {!proto.CouncilCandidacyNoteMetadata}
  86. */
  87. proto.CouncilCandidacyNoteMetadata.deserializeBinary = function(bytes) {
  88. var reader = new jspb.BinaryReader(bytes);
  89. var msg = new proto.CouncilCandidacyNoteMetadata;
  90. return proto.CouncilCandidacyNoteMetadata.deserializeBinaryFromReader(msg, reader);
  91. };
  92. /**
  93. * Deserializes binary data (in protobuf wire format) from the
  94. * given reader into the given message object.
  95. * @param {!proto.CouncilCandidacyNoteMetadata} msg The message object to deserialize into.
  96. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  97. * @return {!proto.CouncilCandidacyNoteMetadata}
  98. */
  99. proto.CouncilCandidacyNoteMetadata.deserializeBinaryFromReader = function(msg, reader) {
  100. while (reader.nextField()) {
  101. if (reader.isEndGroup()) {
  102. break;
  103. }
  104. var field = reader.getFieldNumber();
  105. switch (field) {
  106. case 1:
  107. var value = /** @type {string} */ (reader.readString());
  108. msg.setHeader(value);
  109. break;
  110. case 2:
  111. var value = /** @type {string} */ (reader.readString());
  112. msg.addBulletPoints(value);
  113. break;
  114. case 3:
  115. var value = /** @type {string} */ (reader.readString());
  116. msg.setCoverImage(value);
  117. break;
  118. case 4:
  119. var value = /** @type {string} */ (reader.readString());
  120. msg.setDescription(value);
  121. break;
  122. default:
  123. reader.skipField();
  124. break;
  125. }
  126. }
  127. return msg;
  128. };
  129. /**
  130. * Serializes the message to binary data (in protobuf wire format).
  131. * @return {!Uint8Array}
  132. */
  133. proto.CouncilCandidacyNoteMetadata.prototype.serializeBinary = function() {
  134. var writer = new jspb.BinaryWriter();
  135. proto.CouncilCandidacyNoteMetadata.serializeBinaryToWriter(this, writer);
  136. return writer.getResultBuffer();
  137. };
  138. /**
  139. * Serializes the given message to binary data (in protobuf wire
  140. * format), writing to the given BinaryWriter.
  141. * @param {!proto.CouncilCandidacyNoteMetadata} message
  142. * @param {!jspb.BinaryWriter} writer
  143. * @suppress {unusedLocalVariables} f is only used for nested messages
  144. */
  145. proto.CouncilCandidacyNoteMetadata.serializeBinaryToWriter = function(message, writer) {
  146. var f = undefined;
  147. f = /** @type {string} */ (jspb.Message.getField(message, 1));
  148. if (f != null) {
  149. writer.writeString(
  150. 1,
  151. f
  152. );
  153. }
  154. f = message.getBulletPointsList();
  155. if (f.length > 0) {
  156. writer.writeRepeatedString(
  157. 2,
  158. f
  159. );
  160. }
  161. f = /** @type {string} */ (jspb.Message.getField(message, 3));
  162. if (f != null) {
  163. writer.writeString(
  164. 3,
  165. f
  166. );
  167. }
  168. f = /** @type {string} */ (jspb.Message.getField(message, 4));
  169. if (f != null) {
  170. writer.writeString(
  171. 4,
  172. f
  173. );
  174. }
  175. };
  176. /**
  177. * optional string header = 1;
  178. * @return {string}
  179. */
  180. proto.CouncilCandidacyNoteMetadata.prototype.getHeader = function() {
  181. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  182. };
  183. /**
  184. * @param {string} value
  185. * @return {!proto.CouncilCandidacyNoteMetadata} returns this
  186. */
  187. proto.CouncilCandidacyNoteMetadata.prototype.setHeader = function(value) {
  188. return jspb.Message.setField(this, 1, value);
  189. };
  190. /**
  191. * Clears the field making it undefined.
  192. * @return {!proto.CouncilCandidacyNoteMetadata} returns this
  193. */
  194. proto.CouncilCandidacyNoteMetadata.prototype.clearHeader = function() {
  195. return jspb.Message.setField(this, 1, undefined);
  196. };
  197. /**
  198. * Returns whether this field is set.
  199. * @return {boolean}
  200. */
  201. proto.CouncilCandidacyNoteMetadata.prototype.hasHeader = function() {
  202. return jspb.Message.getField(this, 1) != null;
  203. };
  204. /**
  205. * repeated string bullet_points = 2;
  206. * @return {!Array<string>}
  207. */
  208. proto.CouncilCandidacyNoteMetadata.prototype.getBulletPointsList = function() {
  209. return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
  210. };
  211. /**
  212. * @param {!Array<string>} value
  213. * @return {!proto.CouncilCandidacyNoteMetadata} returns this
  214. */
  215. proto.CouncilCandidacyNoteMetadata.prototype.setBulletPointsList = function(value) {
  216. return jspb.Message.setField(this, 2, value || []);
  217. };
  218. /**
  219. * @param {string} value
  220. * @param {number=} opt_index
  221. * @return {!proto.CouncilCandidacyNoteMetadata} returns this
  222. */
  223. proto.CouncilCandidacyNoteMetadata.prototype.addBulletPoints = function(value, opt_index) {
  224. return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
  225. };
  226. /**
  227. * Clears the list making it empty but non-null.
  228. * @return {!proto.CouncilCandidacyNoteMetadata} returns this
  229. */
  230. proto.CouncilCandidacyNoteMetadata.prototype.clearBulletPointsList = function() {
  231. return this.setBulletPointsList([]);
  232. };
  233. /**
  234. * optional string cover_image = 3;
  235. * @return {string}
  236. */
  237. proto.CouncilCandidacyNoteMetadata.prototype.getCoverImage = function() {
  238. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
  239. };
  240. /**
  241. * @param {string} value
  242. * @return {!proto.CouncilCandidacyNoteMetadata} returns this
  243. */
  244. proto.CouncilCandidacyNoteMetadata.prototype.setCoverImage = function(value) {
  245. return jspb.Message.setField(this, 3, value);
  246. };
  247. /**
  248. * Clears the field making it undefined.
  249. * @return {!proto.CouncilCandidacyNoteMetadata} returns this
  250. */
  251. proto.CouncilCandidacyNoteMetadata.prototype.clearCoverImage = function() {
  252. return jspb.Message.setField(this, 3, undefined);
  253. };
  254. /**
  255. * Returns whether this field is set.
  256. * @return {boolean}
  257. */
  258. proto.CouncilCandidacyNoteMetadata.prototype.hasCoverImage = function() {
  259. return jspb.Message.getField(this, 3) != null;
  260. };
  261. /**
  262. * optional string description = 4;
  263. * @return {string}
  264. */
  265. proto.CouncilCandidacyNoteMetadata.prototype.getDescription = function() {
  266. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
  267. };
  268. /**
  269. * @param {string} value
  270. * @return {!proto.CouncilCandidacyNoteMetadata} returns this
  271. */
  272. proto.CouncilCandidacyNoteMetadata.prototype.setDescription = function(value) {
  273. return jspb.Message.setField(this, 4, value);
  274. };
  275. /**
  276. * Clears the field making it undefined.
  277. * @return {!proto.CouncilCandidacyNoteMetadata} returns this
  278. */
  279. proto.CouncilCandidacyNoteMetadata.prototype.clearDescription = function() {
  280. return jspb.Message.setField(this, 4, undefined);
  281. };
  282. /**
  283. * Returns whether this field is set.
  284. * @return {boolean}
  285. */
  286. proto.CouncilCandidacyNoteMetadata.prototype.hasDescription = function() {
  287. return jspb.Message.getField(this, 4) != null;
  288. };
  289. goog.object.extend(exports, proto);