tripupdate.js 35 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082
  1. /**
  2. * @fileoverview
  3. * @enhanceable
  4. * @public
  5. */
  6. // GENERATED CODE -- DO NOT EDIT!
  7. goog.provide('proto.transit_realtime.TripUpdate');
  8. goog.provide('proto.transit_realtime.TripUpdate.StopTimeEvent');
  9. goog.provide('proto.transit_realtime.TripUpdate.StopTimeUpdate');
  10. goog.provide('proto.transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship');
  11. goog.provide('proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties');
  12. goog.provide('proto.transit_realtime.TripUpdate.TripProperties');
  13. goog.require('jspb.Message');
  14. goog.require('proto.transit_realtime.TripDescriptor');
  15. goog.require('proto.transit_realtime.VehicleDescriptor');
  16. goog.forwardDeclare('proto.transit_realtime.VehiclePosition.OccupancyStatus');
  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.transit_realtime.TripUpdate = function(opt_data) {
  28. jspb.Message.initialize(this, opt_data, 0, 7, proto.transit_realtime.TripUpdate.repeatedFields_, null);
  29. };
  30. goog.inherits(proto.transit_realtime.TripUpdate, jspb.Message);
  31. if (goog.DEBUG && !COMPILED) {
  32. proto.transit_realtime.TripUpdate.displayName = 'proto.transit_realtime.TripUpdate';
  33. }
  34. /**
  35. * List of repeated fields within this message type.
  36. * @private {!Array<number>}
  37. * @const
  38. */
  39. proto.transit_realtime.TripUpdate.repeatedFields_ = [2];
  40. if (jspb.Message.GENERATE_TO_OBJECT) {
  41. /**
  42. * Creates an object representation of this proto suitable for use in Soy templates.
  43. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  44. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  45. * For the list of reserved names please see:
  46. * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
  47. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
  48. * for transitional soy proto support: http://goto/soy-param-migration
  49. * @return {!Object}
  50. */
  51. proto.transit_realtime.TripUpdate.prototype.toObject = function(opt_includeInstance) {
  52. return proto.transit_realtime.TripUpdate.toObject(opt_includeInstance, this);
  53. };
  54. /**
  55. * Static version of the {@see toObject} method.
  56. * @param {boolean|undefined} includeInstance Whether to include the JSPB
  57. * instance for transitional soy proto support:
  58. * http://goto/soy-param-migration
  59. * @param {!proto.transit_realtime.TripUpdate} msg The msg instance to transform.
  60. * @return {!Object}
  61. */
  62. proto.transit_realtime.TripUpdate.toObject = function(includeInstance, msg) {
  63. var f, obj = {
  64. trip: (f = msg.getTrip()) && proto.transit_realtime.TripDescriptor.toObject(includeInstance, f),
  65. vehicle: (f = msg.getVehicle()) && proto.transit_realtime.VehicleDescriptor.toObject(includeInstance, f),
  66. stopTimeUpdateList: jspb.Message.toObjectList(msg.getStopTimeUpdateList(),
  67. proto.transit_realtime.TripUpdate.StopTimeUpdate.toObject, includeInstance),
  68. timestamp: jspb.Message.getField(msg, 4),
  69. delay: jspb.Message.getField(msg, 5),
  70. tripProperties: (f = msg.getTripProperties()) && proto.transit_realtime.TripUpdate.TripProperties.toObject(includeInstance, f)
  71. };
  72. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  73. proto.transit_realtime.TripUpdate.extensions, proto.transit_realtime.TripUpdate.prototype.getExtension,
  74. includeInstance);
  75. if (includeInstance) {
  76. obj.$jspbMessageInstance = msg;
  77. }
  78. return obj;
  79. };
  80. }
  81. /**
  82. * Creates a deep clone of this proto. No data is shared with the original.
  83. * @return {!proto.transit_realtime.TripUpdate} The clone.
  84. */
  85. proto.transit_realtime.TripUpdate.prototype.cloneMessage = function() {
  86. return /** @type {!proto.transit_realtime.TripUpdate} */ (jspb.Message.cloneMessage(this));
  87. };
  88. /**
  89. * required TripDescriptor trip = 1;
  90. * @return {!proto.transit_realtime.TripDescriptor}
  91. */
  92. proto.transit_realtime.TripUpdate.prototype.getTrip = function() {
  93. return /** @type{!proto.transit_realtime.TripDescriptor} */ (
  94. jspb.Message.getWrapperField(this, proto.transit_realtime.TripDescriptor, 1, 1));
  95. };
  96. /** @param {proto.transit_realtime.TripDescriptor|undefined} value */
  97. proto.transit_realtime.TripUpdate.prototype.setTrip = function(value) {
  98. jspb.Message.setWrapperField(this, 1, value);
  99. };
  100. proto.transit_realtime.TripUpdate.prototype.clearTrip = function() {
  101. this.setTrip(undefined);
  102. };
  103. /**
  104. * Returns whether this field is set.
  105. * @return{!boolean}
  106. */
  107. proto.transit_realtime.TripUpdate.prototype.hasTrip = function() {
  108. return jspb.Message.getField(this, 1) != null;
  109. };
  110. /**
  111. * optional VehicleDescriptor vehicle = 3;
  112. * @return {proto.transit_realtime.VehicleDescriptor}
  113. */
  114. proto.transit_realtime.TripUpdate.prototype.getVehicle = function() {
  115. return /** @type{proto.transit_realtime.VehicleDescriptor} */ (
  116. jspb.Message.getWrapperField(this, proto.transit_realtime.VehicleDescriptor, 3));
  117. };
  118. /** @param {proto.transit_realtime.VehicleDescriptor|undefined} value */
  119. proto.transit_realtime.TripUpdate.prototype.setVehicle = function(value) {
  120. jspb.Message.setWrapperField(this, 3, value);
  121. };
  122. proto.transit_realtime.TripUpdate.prototype.clearVehicle = function() {
  123. this.setVehicle(undefined);
  124. };
  125. /**
  126. * Returns whether this field is set.
  127. * @return{!boolean}
  128. */
  129. proto.transit_realtime.TripUpdate.prototype.hasVehicle = function() {
  130. return jspb.Message.getField(this, 3) != null;
  131. };
  132. /**
  133. * repeated StopTimeUpdate stop_time_update = 2;
  134. * If you change this array by adding, removing or replacing elements, or if you
  135. * replace the array itself, then you must call the setter to update it.
  136. * @return {!Array.<!proto.transit_realtime.TripUpdate.StopTimeUpdate>}
  137. */
  138. proto.transit_realtime.TripUpdate.prototype.getStopTimeUpdateList = function() {
  139. return /** @type{!Array.<!proto.transit_realtime.TripUpdate.StopTimeUpdate>} */ (
  140. jspb.Message.getRepeatedWrapperField(this, proto.transit_realtime.TripUpdate.StopTimeUpdate, 2));
  141. };
  142. /** @param {Array.<!proto.transit_realtime.TripUpdate.StopTimeUpdate>} value */
  143. proto.transit_realtime.TripUpdate.prototype.setStopTimeUpdateList = function(value) {
  144. jspb.Message.setRepeatedWrapperField(this, 2, value);
  145. };
  146. proto.transit_realtime.TripUpdate.prototype.clearStopTimeUpdateList = function() {
  147. this.setStopTimeUpdateList([]);
  148. };
  149. /**
  150. * optional uint64 timestamp = 4;
  151. * @return {number}
  152. */
  153. proto.transit_realtime.TripUpdate.prototype.getTimestamp = function() {
  154. return /** @type {number} */ (!this.hasTimestamp() ? 0 : jspb.Message.getField(this, 4));
  155. };
  156. /** @param {number?|undefined} value */
  157. proto.transit_realtime.TripUpdate.prototype.setTimestamp = function(value) {
  158. jspb.Message.setField(this, 4, value);
  159. };
  160. proto.transit_realtime.TripUpdate.prototype.clearTimestamp = function() {
  161. jspb.Message.setField(this, 4, undefined);
  162. };
  163. /**
  164. * Returns whether this field is set.
  165. * @return{!boolean}
  166. */
  167. proto.transit_realtime.TripUpdate.prototype.hasTimestamp = function() {
  168. return jspb.Message.getField(this, 4) != null;
  169. };
  170. /**
  171. * optional int32 delay = 5;
  172. * @return {number}
  173. */
  174. proto.transit_realtime.TripUpdate.prototype.getDelay = function() {
  175. return /** @type {number} */ (!this.hasDelay() ? 0 : jspb.Message.getField(this, 5));
  176. };
  177. /** @param {number?|undefined} value */
  178. proto.transit_realtime.TripUpdate.prototype.setDelay = function(value) {
  179. jspb.Message.setField(this, 5, value);
  180. };
  181. proto.transit_realtime.TripUpdate.prototype.clearDelay = function() {
  182. jspb.Message.setField(this, 5, undefined);
  183. };
  184. /**
  185. * Returns whether this field is set.
  186. * @return{!boolean}
  187. */
  188. proto.transit_realtime.TripUpdate.prototype.hasDelay = function() {
  189. return jspb.Message.getField(this, 5) != null;
  190. };
  191. /**
  192. * optional TripProperties trip_properties = 6;
  193. * @return {proto.transit_realtime.TripUpdate.TripProperties}
  194. */
  195. proto.transit_realtime.TripUpdate.prototype.getTripProperties = function() {
  196. return /** @type{proto.transit_realtime.TripUpdate.TripProperties} */ (
  197. jspb.Message.getWrapperField(this, proto.transit_realtime.TripUpdate.TripProperties, 6));
  198. };
  199. /** @param {proto.transit_realtime.TripUpdate.TripProperties|undefined} value */
  200. proto.transit_realtime.TripUpdate.prototype.setTripProperties = function(value) {
  201. jspb.Message.setWrapperField(this, 6, value);
  202. };
  203. proto.transit_realtime.TripUpdate.prototype.clearTripProperties = function() {
  204. this.setTripProperties(undefined);
  205. };
  206. /**
  207. * Returns whether this field is set.
  208. * @return{!boolean}
  209. */
  210. proto.transit_realtime.TripUpdate.prototype.hasTripProperties = function() {
  211. return jspb.Message.getField(this, 6) != null;
  212. };
  213. /**
  214. * The extensions registered with this message class. This is a map of
  215. * extension field number to fieldInfo object.
  216. *
  217. * For example:
  218. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  219. *
  220. * fieldName contains the JsCompiler renamed field name property so that it
  221. * works in OPTIMIZED mode.
  222. *
  223. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  224. */
  225. proto.transit_realtime.TripUpdate.extensions = {};
  226. /**
  227. * Generated by JsPbCodeGenerator.
  228. * @param {Array=} opt_data Optional initial data array, typically from a
  229. * server response, or constructed directly in Javascript. The array is used
  230. * in place and becomes part of the constructed object. It is not cloned.
  231. * If no data is provided, the constructed object will be empty, but still
  232. * valid.
  233. * @extends {jspb.Message}
  234. * @constructor
  235. */
  236. proto.transit_realtime.TripUpdate.StopTimeEvent = function(opt_data) {
  237. jspb.Message.initialize(this, opt_data, 0, 4, null, null);
  238. };
  239. goog.inherits(proto.transit_realtime.TripUpdate.StopTimeEvent, jspb.Message);
  240. if (goog.DEBUG && !COMPILED) {
  241. proto.transit_realtime.TripUpdate.StopTimeEvent.displayName = 'proto.transit_realtime.TripUpdate.StopTimeEvent';
  242. }
  243. if (jspb.Message.GENERATE_TO_OBJECT) {
  244. /**
  245. * Creates an object representation of this proto suitable for use in Soy templates.
  246. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  247. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  248. * For the list of reserved names please see:
  249. * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
  250. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
  251. * for transitional soy proto support: http://goto/soy-param-migration
  252. * @return {!Object}
  253. */
  254. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.toObject = function(opt_includeInstance) {
  255. return proto.transit_realtime.TripUpdate.StopTimeEvent.toObject(opt_includeInstance, this);
  256. };
  257. /**
  258. * Static version of the {@see toObject} method.
  259. * @param {boolean|undefined} includeInstance Whether to include the JSPB
  260. * instance for transitional soy proto support:
  261. * http://goto/soy-param-migration
  262. * @param {!proto.transit_realtime.TripUpdate.StopTimeEvent} msg The msg instance to transform.
  263. * @return {!Object}
  264. */
  265. proto.transit_realtime.TripUpdate.StopTimeEvent.toObject = function(includeInstance, msg) {
  266. var f, obj = {
  267. delay: jspb.Message.getField(msg, 1),
  268. time: jspb.Message.getField(msg, 2),
  269. uncertainty: jspb.Message.getField(msg, 3)
  270. };
  271. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  272. proto.transit_realtime.TripUpdate.StopTimeEvent.extensions, proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.getExtension,
  273. includeInstance);
  274. if (includeInstance) {
  275. obj.$jspbMessageInstance = msg;
  276. }
  277. return obj;
  278. };
  279. }
  280. /**
  281. * Creates a deep clone of this proto. No data is shared with the original.
  282. * @return {!proto.transit_realtime.TripUpdate.StopTimeEvent} The clone.
  283. */
  284. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.cloneMessage = function() {
  285. return /** @type {!proto.transit_realtime.TripUpdate.StopTimeEvent} */ (jspb.Message.cloneMessage(this));
  286. };
  287. /**
  288. * optional int32 delay = 1;
  289. * @return {number}
  290. */
  291. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.getDelay = function() {
  292. return /** @type {number} */ (!this.hasDelay() ? 0 : jspb.Message.getField(this, 1));
  293. };
  294. /** @param {number?|undefined} value */
  295. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.setDelay = function(value) {
  296. jspb.Message.setField(this, 1, value);
  297. };
  298. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.clearDelay = function() {
  299. jspb.Message.setField(this, 1, undefined);
  300. };
  301. /**
  302. * Returns whether this field is set.
  303. * @return{!boolean}
  304. */
  305. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.hasDelay = function() {
  306. return jspb.Message.getField(this, 1) != null;
  307. };
  308. /**
  309. * optional int64 time = 2;
  310. * @return {number}
  311. */
  312. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.getTime = function() {
  313. return /** @type {number} */ (!this.hasTime() ? 0 : jspb.Message.getField(this, 2));
  314. };
  315. /** @param {number?|undefined} value */
  316. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.setTime = function(value) {
  317. jspb.Message.setField(this, 2, value);
  318. };
  319. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.clearTime = function() {
  320. jspb.Message.setField(this, 2, undefined);
  321. };
  322. /**
  323. * Returns whether this field is set.
  324. * @return{!boolean}
  325. */
  326. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.hasTime = function() {
  327. return jspb.Message.getField(this, 2) != null;
  328. };
  329. /**
  330. * optional int32 uncertainty = 3;
  331. * @return {number}
  332. */
  333. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.getUncertainty = function() {
  334. return /** @type {number} */ (!this.hasUncertainty() ? 0 : jspb.Message.getField(this, 3));
  335. };
  336. /** @param {number?|undefined} value */
  337. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.setUncertainty = function(value) {
  338. jspb.Message.setField(this, 3, value);
  339. };
  340. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.clearUncertainty = function() {
  341. jspb.Message.setField(this, 3, undefined);
  342. };
  343. /**
  344. * Returns whether this field is set.
  345. * @return{!boolean}
  346. */
  347. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.hasUncertainty = function() {
  348. return jspb.Message.getField(this, 3) != null;
  349. };
  350. /**
  351. * The extensions registered with this message class. This is a map of
  352. * extension field number to fieldInfo object.
  353. *
  354. * For example:
  355. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  356. *
  357. * fieldName contains the JsCompiler renamed field name property so that it
  358. * works in OPTIMIZED mode.
  359. *
  360. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  361. */
  362. proto.transit_realtime.TripUpdate.StopTimeEvent.extensions = {};
  363. /**
  364. * Generated by JsPbCodeGenerator.
  365. * @param {Array=} opt_data Optional initial data array, typically from a
  366. * server response, or constructed directly in Javascript. The array is used
  367. * in place and becomes part of the constructed object. It is not cloned.
  368. * If no data is provided, the constructed object will be empty, but still
  369. * valid.
  370. * @extends {jspb.Message}
  371. * @constructor
  372. */
  373. proto.transit_realtime.TripUpdate.StopTimeUpdate = function(opt_data) {
  374. jspb.Message.initialize(this, opt_data, 0, 8, null, null);
  375. };
  376. goog.inherits(proto.transit_realtime.TripUpdate.StopTimeUpdate, jspb.Message);
  377. if (goog.DEBUG && !COMPILED) {
  378. proto.transit_realtime.TripUpdate.StopTimeUpdate.displayName = 'proto.transit_realtime.TripUpdate.StopTimeUpdate';
  379. }
  380. if (jspb.Message.GENERATE_TO_OBJECT) {
  381. /**
  382. * Creates an object representation of this proto suitable for use in Soy templates.
  383. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  384. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  385. * For the list of reserved names please see:
  386. * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
  387. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
  388. * for transitional soy proto support: http://goto/soy-param-migration
  389. * @return {!Object}
  390. */
  391. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.toObject = function(opt_includeInstance) {
  392. return proto.transit_realtime.TripUpdate.StopTimeUpdate.toObject(opt_includeInstance, this);
  393. };
  394. /**
  395. * Static version of the {@see toObject} method.
  396. * @param {boolean|undefined} includeInstance Whether to include the JSPB
  397. * instance for transitional soy proto support:
  398. * http://goto/soy-param-migration
  399. * @param {!proto.transit_realtime.TripUpdate.StopTimeUpdate} msg The msg instance to transform.
  400. * @return {!Object}
  401. */
  402. proto.transit_realtime.TripUpdate.StopTimeUpdate.toObject = function(includeInstance, msg) {
  403. var f, obj = {
  404. stopSequence: jspb.Message.getField(msg, 1),
  405. stopId: jspb.Message.getField(msg, 4),
  406. arrival: (f = msg.getArrival()) && proto.transit_realtime.TripUpdate.StopTimeEvent.toObject(includeInstance, f),
  407. departure: (f = msg.getDeparture()) && proto.transit_realtime.TripUpdate.StopTimeEvent.toObject(includeInstance, f),
  408. departureOccupancyStatus: jspb.Message.getField(msg, 7),
  409. scheduleRelationship: !msg.hasScheduleRelationship() ? 0 : jspb.Message.getField(msg, 5),
  410. stopTimeProperties: (f = msg.getStopTimeProperties()) && proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.toObject(includeInstance, f)
  411. };
  412. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  413. proto.transit_realtime.TripUpdate.StopTimeUpdate.extensions, proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.getExtension,
  414. includeInstance);
  415. if (includeInstance) {
  416. obj.$jspbMessageInstance = msg;
  417. }
  418. return obj;
  419. };
  420. }
  421. /**
  422. * Creates a deep clone of this proto. No data is shared with the original.
  423. * @return {!proto.transit_realtime.TripUpdate.StopTimeUpdate} The clone.
  424. */
  425. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.cloneMessage = function() {
  426. return /** @type {!proto.transit_realtime.TripUpdate.StopTimeUpdate} */ (jspb.Message.cloneMessage(this));
  427. };
  428. /**
  429. * optional uint32 stop_sequence = 1;
  430. * @return {number}
  431. */
  432. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.getStopSequence = function() {
  433. return /** @type {number} */ (!this.hasStopSequence() ? 0 : jspb.Message.getField(this, 1));
  434. };
  435. /** @param {number?|undefined} value */
  436. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.setStopSequence = function(value) {
  437. jspb.Message.setField(this, 1, value);
  438. };
  439. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.clearStopSequence = function() {
  440. jspb.Message.setField(this, 1, undefined);
  441. };
  442. /**
  443. * Returns whether this field is set.
  444. * @return{!boolean}
  445. */
  446. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.hasStopSequence = function() {
  447. return jspb.Message.getField(this, 1) != null;
  448. };
  449. /**
  450. * optional string stop_id = 4;
  451. * @return {string}
  452. */
  453. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.getStopId = function() {
  454. return /** @type {string} */ (!this.hasStopId() ? "" : jspb.Message.getField(this, 4));
  455. };
  456. /** @param {string?|undefined} value */
  457. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.setStopId = function(value) {
  458. jspb.Message.setField(this, 4, value);
  459. };
  460. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.clearStopId = function() {
  461. jspb.Message.setField(this, 4, undefined);
  462. };
  463. /**
  464. * Returns whether this field is set.
  465. * @return{!boolean}
  466. */
  467. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.hasStopId = function() {
  468. return jspb.Message.getField(this, 4) != null;
  469. };
  470. /**
  471. * optional StopTimeEvent arrival = 2;
  472. * @return {proto.transit_realtime.TripUpdate.StopTimeEvent}
  473. */
  474. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.getArrival = function() {
  475. return /** @type{proto.transit_realtime.TripUpdate.StopTimeEvent} */ (
  476. jspb.Message.getWrapperField(this, proto.transit_realtime.TripUpdate.StopTimeEvent, 2));
  477. };
  478. /** @param {proto.transit_realtime.TripUpdate.StopTimeEvent|undefined} value */
  479. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.setArrival = function(value) {
  480. jspb.Message.setWrapperField(this, 2, value);
  481. };
  482. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.clearArrival = function() {
  483. this.setArrival(undefined);
  484. };
  485. /**
  486. * Returns whether this field is set.
  487. * @return{!boolean}
  488. */
  489. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.hasArrival = function() {
  490. return jspb.Message.getField(this, 2) != null;
  491. };
  492. /**
  493. * optional StopTimeEvent departure = 3;
  494. * @return {proto.transit_realtime.TripUpdate.StopTimeEvent}
  495. */
  496. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.getDeparture = function() {
  497. return /** @type{proto.transit_realtime.TripUpdate.StopTimeEvent} */ (
  498. jspb.Message.getWrapperField(this, proto.transit_realtime.TripUpdate.StopTimeEvent, 3));
  499. };
  500. /** @param {proto.transit_realtime.TripUpdate.StopTimeEvent|undefined} value */
  501. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.setDeparture = function(value) {
  502. jspb.Message.setWrapperField(this, 3, value);
  503. };
  504. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.clearDeparture = function() {
  505. this.setDeparture(undefined);
  506. };
  507. /**
  508. * Returns whether this field is set.
  509. * @return{!boolean}
  510. */
  511. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.hasDeparture = function() {
  512. return jspb.Message.getField(this, 3) != null;
  513. };
  514. /**
  515. * optional VehiclePosition.OccupancyStatus departure_occupancy_status = 7;
  516. * @return {proto.transit_realtime.VehiclePosition.OccupancyStatus}
  517. */
  518. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.getDepartureOccupancyStatus = function() {
  519. return /** @type {proto.transit_realtime.VehiclePosition.OccupancyStatus} */ (!this.hasDepartureOccupancyStatus() ? 0 : jspb.Message.getField(this, 7));
  520. };
  521. /** @param {proto.transit_realtime.VehiclePosition.OccupancyStatus|undefined} value */
  522. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.setDepartureOccupancyStatus = function(value) {
  523. jspb.Message.setField(this, 7, value);
  524. };
  525. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.clearDepartureOccupancyStatus = function() {
  526. jspb.Message.setField(this, 7, undefined);
  527. };
  528. /**
  529. * Returns whether this field is set.
  530. * @return{!boolean}
  531. */
  532. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.hasDepartureOccupancyStatus = function() {
  533. return jspb.Message.getField(this, 7) != null;
  534. };
  535. /**
  536. * optional ScheduleRelationship schedule_relationship = 5;
  537. * @return {proto.transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship}
  538. */
  539. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.getScheduleRelationship = function() {
  540. return /** @type {proto.transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship} */ (!this.hasScheduleRelationship() ? 0 : jspb.Message.getField(this, 5));
  541. };
  542. /** @param {proto.transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship|undefined} value */
  543. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.setScheduleRelationship = function(value) {
  544. jspb.Message.setField(this, 5, value);
  545. };
  546. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.clearScheduleRelationship = function() {
  547. jspb.Message.setField(this, 5, undefined);
  548. };
  549. /**
  550. * Returns whether this field is set.
  551. * @return{!boolean}
  552. */
  553. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.hasScheduleRelationship = function() {
  554. return jspb.Message.getField(this, 5) != null;
  555. };
  556. /**
  557. * optional StopTimeProperties stop_time_properties = 6;
  558. * @return {proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties}
  559. */
  560. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.getStopTimeProperties = function() {
  561. return /** @type{proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties} */ (
  562. jspb.Message.getWrapperField(this, proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties, 6));
  563. };
  564. /** @param {proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties|undefined} value */
  565. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.setStopTimeProperties = function(value) {
  566. jspb.Message.setWrapperField(this, 6, value);
  567. };
  568. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.clearStopTimeProperties = function() {
  569. this.setStopTimeProperties(undefined);
  570. };
  571. /**
  572. * Returns whether this field is set.
  573. * @return{!boolean}
  574. */
  575. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.hasStopTimeProperties = function() {
  576. return jspb.Message.getField(this, 6) != null;
  577. };
  578. /**
  579. * The extensions registered with this message class. This is a map of
  580. * extension field number to fieldInfo object.
  581. *
  582. * For example:
  583. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  584. *
  585. * fieldName contains the JsCompiler renamed field name property so that it
  586. * works in OPTIMIZED mode.
  587. *
  588. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  589. */
  590. proto.transit_realtime.TripUpdate.StopTimeUpdate.extensions = {};
  591. /**
  592. * @enum {number}
  593. */
  594. proto.transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship = {
  595. SCHEDULED: 0,
  596. SKIPPED: 1,
  597. NO_DATA: 2,
  598. UNSCHEDULED: 3
  599. };
  600. /**
  601. * Generated by JsPbCodeGenerator.
  602. * @param {Array=} opt_data Optional initial data array, typically from a
  603. * server response, or constructed directly in Javascript. The array is used
  604. * in place and becomes part of the constructed object. It is not cloned.
  605. * If no data is provided, the constructed object will be empty, but still
  606. * valid.
  607. * @extends {jspb.Message}
  608. * @constructor
  609. */
  610. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties = function(opt_data) {
  611. jspb.Message.initialize(this, opt_data, 0, 2, null, null);
  612. };
  613. goog.inherits(proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties, jspb.Message);
  614. if (goog.DEBUG && !COMPILED) {
  615. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.displayName = 'proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties';
  616. }
  617. if (jspb.Message.GENERATE_TO_OBJECT) {
  618. /**
  619. * Creates an object representation of this proto suitable for use in Soy templates.
  620. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  621. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  622. * For the list of reserved names please see:
  623. * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
  624. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
  625. * for transitional soy proto support: http://goto/soy-param-migration
  626. * @return {!Object}
  627. */
  628. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.prototype.toObject = function(opt_includeInstance) {
  629. return proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.toObject(opt_includeInstance, this);
  630. };
  631. /**
  632. * Static version of the {@see toObject} method.
  633. * @param {boolean|undefined} includeInstance Whether to include the JSPB
  634. * instance for transitional soy proto support:
  635. * http://goto/soy-param-migration
  636. * @param {!proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties} msg The msg instance to transform.
  637. * @return {!Object}
  638. */
  639. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.toObject = function(includeInstance, msg) {
  640. var f, obj = {
  641. assignedStopId: jspb.Message.getField(msg, 1)
  642. };
  643. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  644. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.extensions, proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.prototype.getExtension,
  645. includeInstance);
  646. if (includeInstance) {
  647. obj.$jspbMessageInstance = msg;
  648. }
  649. return obj;
  650. };
  651. }
  652. /**
  653. * Creates a deep clone of this proto. No data is shared with the original.
  654. * @return {!proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties} The clone.
  655. */
  656. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.prototype.cloneMessage = function() {
  657. return /** @type {!proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties} */ (jspb.Message.cloneMessage(this));
  658. };
  659. /**
  660. * optional string assigned_stop_id = 1;
  661. * @return {string}
  662. */
  663. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.prototype.getAssignedStopId = function() {
  664. return /** @type {string} */ (!this.hasAssignedStopId() ? "" : jspb.Message.getField(this, 1));
  665. };
  666. /** @param {string?|undefined} value */
  667. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.prototype.setAssignedStopId = function(value) {
  668. jspb.Message.setField(this, 1, value);
  669. };
  670. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.prototype.clearAssignedStopId = function() {
  671. jspb.Message.setField(this, 1, undefined);
  672. };
  673. /**
  674. * Returns whether this field is set.
  675. * @return{!boolean}
  676. */
  677. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.prototype.hasAssignedStopId = function() {
  678. return jspb.Message.getField(this, 1) != null;
  679. };
  680. /**
  681. * The extensions registered with this message class. This is a map of
  682. * extension field number to fieldInfo object.
  683. *
  684. * For example:
  685. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  686. *
  687. * fieldName contains the JsCompiler renamed field name property so that it
  688. * works in OPTIMIZED mode.
  689. *
  690. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  691. */
  692. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.extensions = {};
  693. /**
  694. * Generated by JsPbCodeGenerator.
  695. * @param {Array=} opt_data Optional initial data array, typically from a
  696. * server response, or constructed directly in Javascript. The array is used
  697. * in place and becomes part of the constructed object. It is not cloned.
  698. * If no data is provided, the constructed object will be empty, but still
  699. * valid.
  700. * @extends {jspb.Message}
  701. * @constructor
  702. */
  703. proto.transit_realtime.TripUpdate.TripProperties = function(opt_data) {
  704. jspb.Message.initialize(this, opt_data, 0, 5, null, null);
  705. };
  706. goog.inherits(proto.transit_realtime.TripUpdate.TripProperties, jspb.Message);
  707. if (goog.DEBUG && !COMPILED) {
  708. proto.transit_realtime.TripUpdate.TripProperties.displayName = 'proto.transit_realtime.TripUpdate.TripProperties';
  709. }
  710. if (jspb.Message.GENERATE_TO_OBJECT) {
  711. /**
  712. * Creates an object representation of this proto suitable for use in Soy templates.
  713. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  714. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  715. * For the list of reserved names please see:
  716. * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
  717. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
  718. * for transitional soy proto support: http://goto/soy-param-migration
  719. * @return {!Object}
  720. */
  721. proto.transit_realtime.TripUpdate.TripProperties.prototype.toObject = function(opt_includeInstance) {
  722. return proto.transit_realtime.TripUpdate.TripProperties.toObject(opt_includeInstance, this);
  723. };
  724. /**
  725. * Static version of the {@see toObject} method.
  726. * @param {boolean|undefined} includeInstance Whether to include the JSPB
  727. * instance for transitional soy proto support:
  728. * http://goto/soy-param-migration
  729. * @param {!proto.transit_realtime.TripUpdate.TripProperties} msg The msg instance to transform.
  730. * @return {!Object}
  731. */
  732. proto.transit_realtime.TripUpdate.TripProperties.toObject = function(includeInstance, msg) {
  733. var f, obj = {
  734. tripId: jspb.Message.getField(msg, 1),
  735. startDate: jspb.Message.getField(msg, 2),
  736. startTime: jspb.Message.getField(msg, 3),
  737. shapeId: jspb.Message.getField(msg, 4)
  738. };
  739. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  740. proto.transit_realtime.TripUpdate.TripProperties.extensions, proto.transit_realtime.TripUpdate.TripProperties.prototype.getExtension,
  741. includeInstance);
  742. if (includeInstance) {
  743. obj.$jspbMessageInstance = msg;
  744. }
  745. return obj;
  746. };
  747. }
  748. /**
  749. * Creates a deep clone of this proto. No data is shared with the original.
  750. * @return {!proto.transit_realtime.TripUpdate.TripProperties} The clone.
  751. */
  752. proto.transit_realtime.TripUpdate.TripProperties.prototype.cloneMessage = function() {
  753. return /** @type {!proto.transit_realtime.TripUpdate.TripProperties} */ (jspb.Message.cloneMessage(this));
  754. };
  755. /**
  756. * optional string trip_id = 1;
  757. * @return {string}
  758. */
  759. proto.transit_realtime.TripUpdate.TripProperties.prototype.getTripId = function() {
  760. return /** @type {string} */ (!this.hasTripId() ? "" : jspb.Message.getField(this, 1));
  761. };
  762. /** @param {string?|undefined} value */
  763. proto.transit_realtime.TripUpdate.TripProperties.prototype.setTripId = function(value) {
  764. jspb.Message.setField(this, 1, value);
  765. };
  766. proto.transit_realtime.TripUpdate.TripProperties.prototype.clearTripId = function() {
  767. jspb.Message.setField(this, 1, undefined);
  768. };
  769. /**
  770. * Returns whether this field is set.
  771. * @return{!boolean}
  772. */
  773. proto.transit_realtime.TripUpdate.TripProperties.prototype.hasTripId = function() {
  774. return jspb.Message.getField(this, 1) != null;
  775. };
  776. /**
  777. * optional string start_date = 2;
  778. * @return {string}
  779. */
  780. proto.transit_realtime.TripUpdate.TripProperties.prototype.getStartDate = function() {
  781. return /** @type {string} */ (!this.hasStartDate() ? "" : jspb.Message.getField(this, 2));
  782. };
  783. /** @param {string?|undefined} value */
  784. proto.transit_realtime.TripUpdate.TripProperties.prototype.setStartDate = function(value) {
  785. jspb.Message.setField(this, 2, value);
  786. };
  787. proto.transit_realtime.TripUpdate.TripProperties.prototype.clearStartDate = function() {
  788. jspb.Message.setField(this, 2, undefined);
  789. };
  790. /**
  791. * Returns whether this field is set.
  792. * @return{!boolean}
  793. */
  794. proto.transit_realtime.TripUpdate.TripProperties.prototype.hasStartDate = function() {
  795. return jspb.Message.getField(this, 2) != null;
  796. };
  797. /**
  798. * optional string start_time = 3;
  799. * @return {string}
  800. */
  801. proto.transit_realtime.TripUpdate.TripProperties.prototype.getStartTime = function() {
  802. return /** @type {string} */ (!this.hasStartTime() ? "" : jspb.Message.getField(this, 3));
  803. };
  804. /** @param {string?|undefined} value */
  805. proto.transit_realtime.TripUpdate.TripProperties.prototype.setStartTime = function(value) {
  806. jspb.Message.setField(this, 3, value);
  807. };
  808. proto.transit_realtime.TripUpdate.TripProperties.prototype.clearStartTime = function() {
  809. jspb.Message.setField(this, 3, undefined);
  810. };
  811. /**
  812. * Returns whether this field is set.
  813. * @return{!boolean}
  814. */
  815. proto.transit_realtime.TripUpdate.TripProperties.prototype.hasStartTime = function() {
  816. return jspb.Message.getField(this, 3) != null;
  817. };
  818. /**
  819. * optional string shape_id = 4;
  820. * @return {string}
  821. */
  822. proto.transit_realtime.TripUpdate.TripProperties.prototype.getShapeId = function() {
  823. return /** @type {string} */ (!this.hasShapeId() ? "" : jspb.Message.getField(this, 4));
  824. };
  825. /** @param {string?|undefined} value */
  826. proto.transit_realtime.TripUpdate.TripProperties.prototype.setShapeId = function(value) {
  827. jspb.Message.setField(this, 4, value);
  828. };
  829. proto.transit_realtime.TripUpdate.TripProperties.prototype.clearShapeId = function() {
  830. jspb.Message.setField(this, 4, undefined);
  831. };
  832. /**
  833. * Returns whether this field is set.
  834. * @return{!boolean}
  835. */
  836. proto.transit_realtime.TripUpdate.TripProperties.prototype.hasShapeId = function() {
  837. return jspb.Message.getField(this, 4) != null;
  838. };
  839. /**
  840. * The extensions registered with this message class. This is a map of
  841. * extension field number to fieldInfo object.
  842. *
  843. * For example:
  844. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  845. *
  846. * fieldName contains the JsCompiler renamed field name property so that it
  847. * works in OPTIMIZED mode.
  848. *
  849. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  850. */
  851. proto.transit_realtime.TripUpdate.TripProperties.extensions = {};