gtfs-rb
Version:
Generated JavaScript library based on the GTFS Realtime protocol buffer specification
1,273 lines (1,036 loc) • 71.3 kB
TypeScript
// THIS IS AN AUTO-GENERATED FILE, DO NOT MANUALLY MODIFY
// Copyright (c) 2019 Cyberscape
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// Copyright (c) 2015 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import * as $protobuf from "protobufjs";
/** Namespace transit_realtime. */
export namespace transit_realtime {
/** Properties of a FeedMessage. */
interface IFeedMessage {
/** FeedMessage header */
header: transit_realtime.IFeedHeader;
/** FeedMessage entity */
entity?: (transit_realtime.IFeedEntity[]|null);
}
/** Represents a FeedMessage. */
class FeedMessage implements IFeedMessage {
/**
* Constructs a new FeedMessage.
* @param [properties] Properties to set
*/
constructor(properties?: transit_realtime.IFeedMessage);
/** FeedMessage header. */
public header: transit_realtime.IFeedHeader;
/** FeedMessage entity. */
public entity: transit_realtime.IFeedEntity[];
/**
* Creates a new FeedMessage instance using the specified properties.
* @param [properties] Properties to set
* @returns FeedMessage instance
*/
public static create(properties?: transit_realtime.IFeedMessage): transit_realtime.FeedMessage;
/**
* Encodes the specified FeedMessage message. Does not implicitly {@link transit_realtime.FeedMessage.verify|verify} messages.
* @param message FeedMessage message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: transit_realtime.IFeedMessage, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified FeedMessage message, length delimited. Does not implicitly {@link transit_realtime.FeedMessage.verify|verify} messages.
* @param message FeedMessage message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: transit_realtime.IFeedMessage, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a FeedMessage message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns FeedMessage
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): transit_realtime.FeedMessage;
/**
* Decodes a FeedMessage message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns FeedMessage
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): transit_realtime.FeedMessage;
/**
* Verifies a FeedMessage message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a FeedMessage message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns FeedMessage
*/
public static fromObject(object: { [k: string]: any }): transit_realtime.FeedMessage;
/**
* Creates a plain object from a FeedMessage message. Also converts values to other types if specified.
* @param message FeedMessage
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: transit_realtime.FeedMessage, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this FeedMessage to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
/** Properties of a FeedHeader. */
interface IFeedHeader {
/** FeedHeader gtfsRealtimeVersion */
gtfsRealtimeVersion: string;
/** FeedHeader incrementality */
incrementality?: (transit_realtime.FeedHeader.Incrementality|null);
/** FeedHeader timestamp */
timestamp?: (Long|null);
}
/** Represents a FeedHeader. */
class FeedHeader implements IFeedHeader {
/**
* Constructs a new FeedHeader.
* @param [properties] Properties to set
*/
constructor(properties?: transit_realtime.IFeedHeader);
/** FeedHeader gtfsRealtimeVersion. */
public gtfsRealtimeVersion: string;
/** FeedHeader incrementality. */
public incrementality: transit_realtime.FeedHeader.Incrementality;
/** FeedHeader timestamp. */
public timestamp: Long;
/**
* Creates a new FeedHeader instance using the specified properties.
* @param [properties] Properties to set
* @returns FeedHeader instance
*/
public static create(properties?: transit_realtime.IFeedHeader): transit_realtime.FeedHeader;
/**
* Encodes the specified FeedHeader message. Does not implicitly {@link transit_realtime.FeedHeader.verify|verify} messages.
* @param message FeedHeader message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: transit_realtime.IFeedHeader, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified FeedHeader message, length delimited. Does not implicitly {@link transit_realtime.FeedHeader.verify|verify} messages.
* @param message FeedHeader message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: transit_realtime.IFeedHeader, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a FeedHeader message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns FeedHeader
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): transit_realtime.FeedHeader;
/**
* Decodes a FeedHeader message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns FeedHeader
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): transit_realtime.FeedHeader;
/**
* Verifies a FeedHeader message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a FeedHeader message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns FeedHeader
*/
public static fromObject(object: { [k: string]: any }): transit_realtime.FeedHeader;
/**
* Creates a plain object from a FeedHeader message. Also converts values to other types if specified.
* @param message FeedHeader
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: transit_realtime.FeedHeader, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this FeedHeader to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
namespace FeedHeader {
/** Incrementality enum. */
enum Incrementality {
FULL_DATASET = 0,
DIFFERENTIAL = 1
}
}
/** Properties of a FeedEntity. */
interface IFeedEntity {
/** FeedEntity id */
id: string;
/** FeedEntity isDeleted */
isDeleted?: (boolean|null);
/** FeedEntity tripUpdate */
tripUpdate?: (transit_realtime.ITripUpdate|null);
/** FeedEntity vehicle */
vehicle?: (transit_realtime.IVehiclePosition|null);
/** FeedEntity alert */
alert?: (transit_realtime.IAlert|null);
}
/** Represents a FeedEntity. */
class FeedEntity implements IFeedEntity {
/**
* Constructs a new FeedEntity.
* @param [properties] Properties to set
*/
constructor(properties?: transit_realtime.IFeedEntity);
/** FeedEntity id. */
public id: string;
/** FeedEntity isDeleted. */
public isDeleted: boolean;
/** FeedEntity tripUpdate. */
public tripUpdate?: (transit_realtime.ITripUpdate|null);
/** FeedEntity vehicle. */
public vehicle?: (transit_realtime.IVehiclePosition|null);
/** FeedEntity alert. */
public alert?: (transit_realtime.IAlert|null);
/**
* Creates a new FeedEntity instance using the specified properties.
* @param [properties] Properties to set
* @returns FeedEntity instance
*/
public static create(properties?: transit_realtime.IFeedEntity): transit_realtime.FeedEntity;
/**
* Encodes the specified FeedEntity message. Does not implicitly {@link transit_realtime.FeedEntity.verify|verify} messages.
* @param message FeedEntity message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: transit_realtime.IFeedEntity, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified FeedEntity message, length delimited. Does not implicitly {@link transit_realtime.FeedEntity.verify|verify} messages.
* @param message FeedEntity message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: transit_realtime.IFeedEntity, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a FeedEntity message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns FeedEntity
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): transit_realtime.FeedEntity;
/**
* Decodes a FeedEntity message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns FeedEntity
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): transit_realtime.FeedEntity;
/**
* Verifies a FeedEntity message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a FeedEntity message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns FeedEntity
*/
public static fromObject(object: { [k: string]: any }): transit_realtime.FeedEntity;
/**
* Creates a plain object from a FeedEntity message. Also converts values to other types if specified.
* @param message FeedEntity
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: transit_realtime.FeedEntity, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this FeedEntity to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
/** Properties of a TripUpdate. */
interface ITripUpdate {
/** TripUpdate trip */
trip: transit_realtime.ITripDescriptor;
/** TripUpdate vehicle */
vehicle?: (transit_realtime.IVehicleDescriptor|null);
/** TripUpdate stopTimeUpdate */
stopTimeUpdate?: (transit_realtime.TripUpdate.IStopTimeUpdate[]|null);
/** TripUpdate timestamp */
timestamp?: (Long|null);
/** TripUpdate delay */
delay?: (number|null);
}
/** Represents a TripUpdate. */
class TripUpdate implements ITripUpdate {
/**
* Constructs a new TripUpdate.
* @param [properties] Properties to set
*/
constructor(properties?: transit_realtime.ITripUpdate);
/** TripUpdate trip. */
public trip: transit_realtime.ITripDescriptor;
/** TripUpdate vehicle. */
public vehicle?: (transit_realtime.IVehicleDescriptor|null);
/** TripUpdate stopTimeUpdate. */
public stopTimeUpdate: transit_realtime.TripUpdate.IStopTimeUpdate[];
/** TripUpdate timestamp. */
public timestamp: Long;
/** TripUpdate delay. */
public delay: number;
/**
* Creates a new TripUpdate instance using the specified properties.
* @param [properties] Properties to set
* @returns TripUpdate instance
*/
public static create(properties?: transit_realtime.ITripUpdate): transit_realtime.TripUpdate;
/**
* Encodes the specified TripUpdate message. Does not implicitly {@link transit_realtime.TripUpdate.verify|verify} messages.
* @param message TripUpdate message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: transit_realtime.ITripUpdate, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified TripUpdate message, length delimited. Does not implicitly {@link transit_realtime.TripUpdate.verify|verify} messages.
* @param message TripUpdate message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: transit_realtime.ITripUpdate, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a TripUpdate message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns TripUpdate
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): transit_realtime.TripUpdate;
/**
* Decodes a TripUpdate message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns TripUpdate
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): transit_realtime.TripUpdate;
/**
* Verifies a TripUpdate message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a TripUpdate message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns TripUpdate
*/
public static fromObject(object: { [k: string]: any }): transit_realtime.TripUpdate;
/**
* Creates a plain object from a TripUpdate message. Also converts values to other types if specified.
* @param message TripUpdate
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: transit_realtime.TripUpdate, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this TripUpdate to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
namespace TripUpdate {
/** Properties of a StopTimeEvent. */
interface IStopTimeEvent {
/** StopTimeEvent delay */
delay?: (number|null);
/** StopTimeEvent time */
time?: (Long|null);
/** StopTimeEvent uncertainty */
uncertainty?: (number|null);
}
/** Represents a StopTimeEvent. */
class StopTimeEvent implements IStopTimeEvent {
/**
* Constructs a new StopTimeEvent.
* @param [properties] Properties to set
*/
constructor(properties?: transit_realtime.TripUpdate.IStopTimeEvent);
/** StopTimeEvent delay. */
public delay: number;
/** StopTimeEvent time. */
public time: Long;
/** StopTimeEvent uncertainty. */
public uncertainty: number;
/**
* Creates a new StopTimeEvent instance using the specified properties.
* @param [properties] Properties to set
* @returns StopTimeEvent instance
*/
public static create(properties?: transit_realtime.TripUpdate.IStopTimeEvent): transit_realtime.TripUpdate.StopTimeEvent;
/**
* Encodes the specified StopTimeEvent message. Does not implicitly {@link transit_realtime.TripUpdate.StopTimeEvent.verify|verify} messages.
* @param message StopTimeEvent message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: transit_realtime.TripUpdate.IStopTimeEvent, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified StopTimeEvent message, length delimited. Does not implicitly {@link transit_realtime.TripUpdate.StopTimeEvent.verify|verify} messages.
* @param message StopTimeEvent message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: transit_realtime.TripUpdate.IStopTimeEvent, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a StopTimeEvent message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns StopTimeEvent
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): transit_realtime.TripUpdate.StopTimeEvent;
/**
* Decodes a StopTimeEvent message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns StopTimeEvent
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): transit_realtime.TripUpdate.StopTimeEvent;
/**
* Verifies a StopTimeEvent message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a StopTimeEvent message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns StopTimeEvent
*/
public static fromObject(object: { [k: string]: any }): transit_realtime.TripUpdate.StopTimeEvent;
/**
* Creates a plain object from a StopTimeEvent message. Also converts values to other types if specified.
* @param message StopTimeEvent
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: transit_realtime.TripUpdate.StopTimeEvent, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this StopTimeEvent to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
/** Properties of a StopTimeUpdate. */
interface IStopTimeUpdate {
/** StopTimeUpdate stopSequence */
stopSequence?: (number|null);
/** StopTimeUpdate stopId */
stopId?: (string|null);
/** StopTimeUpdate arrival */
arrival?: (transit_realtime.TripUpdate.IStopTimeEvent|null);
/** StopTimeUpdate departure */
departure?: (transit_realtime.TripUpdate.IStopTimeEvent|null);
/** StopTimeUpdate scheduleRelationship */
scheduleRelationship?: (transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship|null);
}
/** Represents a StopTimeUpdate. */
class StopTimeUpdate implements IStopTimeUpdate {
/**
* Constructs a new StopTimeUpdate.
* @param [properties] Properties to set
*/
constructor(properties?: transit_realtime.TripUpdate.IStopTimeUpdate);
/** StopTimeUpdate stopSequence. */
public stopSequence: number;
/** StopTimeUpdate stopId. */
public stopId: string;
/** StopTimeUpdate arrival. */
public arrival?: (transit_realtime.TripUpdate.IStopTimeEvent|null);
/** StopTimeUpdate departure. */
public departure?: (transit_realtime.TripUpdate.IStopTimeEvent|null);
/** StopTimeUpdate scheduleRelationship. */
public scheduleRelationship: transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship;
/**
* Creates a new StopTimeUpdate instance using the specified properties.
* @param [properties] Properties to set
* @returns StopTimeUpdate instance
*/
public static create(properties?: transit_realtime.TripUpdate.IStopTimeUpdate): transit_realtime.TripUpdate.StopTimeUpdate;
/**
* Encodes the specified StopTimeUpdate message. Does not implicitly {@link transit_realtime.TripUpdate.StopTimeUpdate.verify|verify} messages.
* @param message StopTimeUpdate message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: transit_realtime.TripUpdate.IStopTimeUpdate, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified StopTimeUpdate message, length delimited. Does not implicitly {@link transit_realtime.TripUpdate.StopTimeUpdate.verify|verify} messages.
* @param message StopTimeUpdate message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: transit_realtime.TripUpdate.IStopTimeUpdate, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a StopTimeUpdate message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns StopTimeUpdate
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): transit_realtime.TripUpdate.StopTimeUpdate;
/**
* Decodes a StopTimeUpdate message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns StopTimeUpdate
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): transit_realtime.TripUpdate.StopTimeUpdate;
/**
* Verifies a StopTimeUpdate message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a StopTimeUpdate message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns StopTimeUpdate
*/
public static fromObject(object: { [k: string]: any }): transit_realtime.TripUpdate.StopTimeUpdate;
/**
* Creates a plain object from a StopTimeUpdate message. Also converts values to other types if specified.
* @param message StopTimeUpdate
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: transit_realtime.TripUpdate.StopTimeUpdate, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this StopTimeUpdate to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
namespace StopTimeUpdate {
/** ScheduleRelationship enum. */
enum ScheduleRelationship {
SCHEDULED = 0,
SKIPPED = 1,
NO_DATA = 2
}
}
}
/** Properties of a VehiclePosition. */
interface IVehiclePosition {
/** VehiclePosition trip */
trip?: (transit_realtime.ITripDescriptor|null);
/** VehiclePosition vehicle */
vehicle?: (transit_realtime.IVehicleDescriptor|null);
/** VehiclePosition position */
position?: (transit_realtime.IPosition|null);
/** VehiclePosition currentStopSequence */
currentStopSequence?: (number|null);
/** VehiclePosition stopId */
stopId?: (string|null);
/** VehiclePosition currentStatus */
currentStatus?: (transit_realtime.VehiclePosition.VehicleStopStatus|null);
/** VehiclePosition timestamp */
timestamp?: (Long|null);
/** VehiclePosition congestionLevel */
congestionLevel?: (transit_realtime.VehiclePosition.CongestionLevel|null);
/** VehiclePosition occupancyStatus */
occupancyStatus?: (transit_realtime.VehiclePosition.OccupancyStatus|null);
}
/** Represents a VehiclePosition. */
class VehiclePosition implements IVehiclePosition {
/**
* Constructs a new VehiclePosition.
* @param [properties] Properties to set
*/
constructor(properties?: transit_realtime.IVehiclePosition);
/** VehiclePosition trip. */
public trip?: (transit_realtime.ITripDescriptor|null);
/** VehiclePosition vehicle. */
public vehicle?: (transit_realtime.IVehicleDescriptor|null);
/** VehiclePosition position. */
public position?: (transit_realtime.IPosition|null);
/** VehiclePosition currentStopSequence. */
public currentStopSequence: number;
/** VehiclePosition stopId. */
public stopId: string;
/** VehiclePosition currentStatus. */
public currentStatus: transit_realtime.VehiclePosition.VehicleStopStatus;
/** VehiclePosition timestamp. */
public timestamp: Long;
/** VehiclePosition congestionLevel. */
public congestionLevel: transit_realtime.VehiclePosition.CongestionLevel;
/** VehiclePosition occupancyStatus. */
public occupancyStatus: transit_realtime.VehiclePosition.OccupancyStatus;
/**
* Creates a new VehiclePosition instance using the specified properties.
* @param [properties] Properties to set
* @returns VehiclePosition instance
*/
public static create(properties?: transit_realtime.IVehiclePosition): transit_realtime.VehiclePosition;
/**
* Encodes the specified VehiclePosition message. Does not implicitly {@link transit_realtime.VehiclePosition.verify|verify} messages.
* @param message VehiclePosition message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: transit_realtime.IVehiclePosition, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified VehiclePosition message, length delimited. Does not implicitly {@link transit_realtime.VehiclePosition.verify|verify} messages.
* @param message VehiclePosition message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: transit_realtime.IVehiclePosition, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a VehiclePosition message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns VehiclePosition
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): transit_realtime.VehiclePosition;
/**
* Decodes a VehiclePosition message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns VehiclePosition
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): transit_realtime.VehiclePosition;
/**
* Verifies a VehiclePosition message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a VehiclePosition message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns VehiclePosition
*/
public static fromObject(object: { [k: string]: any }): transit_realtime.VehiclePosition;
/**
* Creates a plain object from a VehiclePosition message. Also converts values to other types if specified.
* @param message VehiclePosition
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: transit_realtime.VehiclePosition, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this VehiclePosition to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
namespace VehiclePosition {
/** VehicleStopStatus enum. */
enum VehicleStopStatus {
INCOMING_AT = 0,
STOPPED_AT = 1,
IN_TRANSIT_TO = 2
}
/** CongestionLevel enum. */
enum CongestionLevel {
UNKNOWN_CONGESTION_LEVEL = 0,
RUNNING_SMOOTHLY = 1,
STOP_AND_GO = 2,
CONGESTION = 3,
SEVERE_CONGESTION = 4
}
/** OccupancyStatus enum. */
enum OccupancyStatus {
EMPTY = 0,
MANY_SEATS_AVAILABLE = 1,
FEW_SEATS_AVAILABLE = 2,
STANDING_ROOM_ONLY = 3,
CRUSHED_STANDING_ROOM_ONLY = 4,
FULL = 5,
NOT_ACCEPTING_PASSENGERS = 6
}
}
/** Properties of an Alert. */
interface IAlert {
/** Alert activePeriod */
activePeriod?: (transit_realtime.ITimeRange[]|null);
/** Alert informedEntity */
informedEntity?: (transit_realtime.IEntitySelector[]|null);
/** Alert cause */
cause?: (transit_realtime.Alert.Cause|null);
/** Alert effect */
effect?: (transit_realtime.Alert.Effect|null);
/** Alert url */
url?: (transit_realtime.ITranslatedString|null);
/** Alert headerText */
headerText?: (transit_realtime.ITranslatedString|null);
/** Alert descriptionText */
descriptionText?: (transit_realtime.ITranslatedString|null);
}
/** Represents an Alert. */
class Alert implements IAlert {
/**
* Constructs a new Alert.
* @param [properties] Properties to set
*/
constructor(properties?: transit_realtime.IAlert);
/** Alert activePeriod. */
public activePeriod: transit_realtime.ITimeRange[];
/** Alert informedEntity. */
public informedEntity: transit_realtime.IEntitySelector[];
/** Alert cause. */
public cause: transit_realtime.Alert.Cause;
/** Alert effect. */
public effect: transit_realtime.Alert.Effect;
/** Alert url. */
public url?: (transit_realtime.ITranslatedString|null);
/** Alert headerText. */
public headerText?: (transit_realtime.ITranslatedString|null);
/** Alert descriptionText. */
public descriptionText?: (transit_realtime.ITranslatedString|null);
/**
* Creates a new Alert instance using the specified properties.
* @param [properties] Properties to set
* @returns Alert instance
*/
public static create(properties?: transit_realtime.IAlert): transit_realtime.Alert;
/**
* Encodes the specified Alert message. Does not implicitly {@link transit_realtime.Alert.verify|verify} messages.
* @param message Alert message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: transit_realtime.IAlert, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified Alert message, length delimited. Does not implicitly {@link transit_realtime.Alert.verify|verify} messages.
* @param message Alert message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: transit_realtime.IAlert, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes an Alert message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns Alert
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): transit_realtime.Alert;
/**
* Decodes an Alert message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns Alert
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): transit_realtime.Alert;
/**
* Verifies an Alert message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates an Alert message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns Alert
*/
public static fromObject(object: { [k: string]: any }): transit_realtime.Alert;
/**
* Creates a plain object from an Alert message. Also converts values to other types if specified.
* @param message Alert
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: transit_realtime.Alert, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this Alert to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
namespace Alert {
/** Cause enum. */
enum Cause {
UNKNOWN_CAUSE = 1,
OTHER_CAUSE = 2,
TECHNICAL_PROBLEM = 3,
STRIKE = 4,
DEMONSTRATION = 5,
ACCIDENT = 6,
HOLIDAY = 7,
WEATHER = 8,
MAINTENANCE = 9,
CONSTRUCTION = 10,
POLICE_ACTIVITY = 11,
MEDICAL_EMERGENCY = 12
}
/** Effect enum. */
enum Effect {
NO_SERVICE = 1,
REDUCED_SERVICE = 2,
SIGNIFICANT_DELAYS = 3,
DETOUR = 4,
ADDITIONAL_SERVICE = 5,
MODIFIED_SERVICE = 6,
OTHER_EFFECT = 7,
UNKNOWN_EFFECT = 8,
STOP_MOVED = 9
}
}
/** Properties of a TimeRange. */
interface ITimeRange {
/** TimeRange start */
start?: (Long|null);
/** TimeRange end */
end?: (Long|null);
}
/** Represents a TimeRange. */
class TimeRange implements ITimeRange {
/**
* Constructs a new TimeRange.
* @param [properties] Properties to set
*/
constructor(properties?: transit_realtime.ITimeRange);
/** TimeRange start. */
public start: Long;
/** TimeRange end. */
public end: Long;
/**
* Creates a new TimeRange instance using the specified properties.
* @param [properties] Properties to set
* @returns TimeRange instance
*/
public static create(properties?: transit_realtime.ITimeRange): transit_realtime.TimeRange;
/**
* Encodes the specified TimeRange message. Does not implicitly {@link transit_realtime.TimeRange.verify|verify} messages.
* @param message TimeRange message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: transit_realtime.ITimeRange, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified TimeRange message, length delimited. Does not implicitly {@link transit_realtime.TimeRange.verify|verify} messages.
* @param message TimeRange message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: transit_realtime.ITimeRange, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a TimeRange message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns TimeRange
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): transit_realtime.TimeRange;
/**
* Decodes a TimeRange message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns TimeRange
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): transit_realtime.TimeRange;
/**
* Verifies a TimeRange message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a TimeRange message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns TimeRange
*/
public static fromObject(object: { [k: string]: any }): transit_realtime.TimeRange;
/**
* Creates a plain object from a TimeRange message. Also converts values to other types if specified.
* @param message TimeRange
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: transit_realtime.TimeRange, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this TimeRange to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
/** Properties of a Position. */
interface IPosition {
/** Position latitude */
latitude: number;
/** Position longitude */
longitude: number;
/** Position bearing */
bearing?: (number|null);
/** Position odometer */
odometer?: (number|null);
/** Position speed */
speed?: (number|null);
}
/** Represents a Position. */
class Position implements IPosition {
/**
* Constructs a new Position.
* @param [properties] Properties to set
*/
constructor(properties?: transit_realtime.IPosition);
/** Position latitude. */
public latitude: number;
/** Position longitude. */
public longitude: number;
/** Position bearing. */
public bearing: number;
/** Position odometer. */
public odometer: number;
/** Position speed. */
public speed: number;
/**
* Creates a new Position instance using the specified properties.
* @param [properties] Properties to set
* @returns Position instance
*/
public static create(properties?: transit_realtime.IPosition): transit_realtime.Position;
/**
* Encodes the specified Position message. Does not implicitly {@link transit_realtime.Position.verify|verify} messages.
* @param message Position message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: transit_realtime.IPosition, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified Position message, length delimited. Does not implicitly {@link transit_realtime.Position.verify|verify} messages.
* @param message Position message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: transit_realtime.IPosition, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a Position message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns Position
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): transit_realtime.Position;
/**
* Decodes a Position message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns Position
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): transit_realtime.Position;
/**
* Verifies a Position message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a Position message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns Position
*/
public static fromObject(object: { [k: string]: any }): transit_realtime.Position;
/**
* Creates a plain object from a Position message. Also converts values to other types if specified.
* @param message Position
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: transit_realtime.Position, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this Position to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
/** Properties of a TripDescriptor. */
interface ITripDescriptor {
/** TripDescriptor tripId */
tripId?: (string|null);
/** TripDescriptor routeId */
routeId?: (string|null);
/** TripDescriptor directionId */
directionId?: (number|null);
/** TripDescriptor startTime */
startTime?: (string|null);
/** TripDescriptor startDate */
startDate?: (string|null);
/** TripDescriptor scheduleRelationship */
scheduleRelationship?: (transit_realtime.TripDescriptor.ScheduleRelationship|null);
}
/** Represents a TripDescriptor. */
class TripDescriptor implements ITripDescriptor {
/**
* Constructs a new TripDescriptor.
* @param [properties] Properties to set
*/
constructor(properties?: transit_realtime.ITripDescriptor);
/** TripDescriptor tripId. */