blob: b77caca58de44525ea3e6b54e4d8743a37c75286 [file] [log] [blame]
avm9996399bb77c2020-01-27 03:15:08 +01001<?php
2# Generated by the protocol buffer compiler. DO NOT EDIT!
3# source: proto/gtfs.proto
4
5namespace Gtfs;
6
7use Google\Protobuf\Internal\GPBType;
8use Google\Protobuf\Internal\RepeatedField;
9use Google\Protobuf\Internal\GPBUtil;
10
11/**
12 * A definition (or update) of an entity in the transit feed.
13 *
14 * Generated from protobuf message <code>gtfs.FeedEntity</code>
15 */
16class FeedEntity extends \Google\Protobuf\Internal\Message
17{
18 /**
19 * The ids are used only to provide incrementality support. The id should be
20 * unique within a FeedMessage. Consequent FeedMessages may contain
21 * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
22 * FeedEntity with some id will replace the old FeedEntity with the same id
23 * (or delete it - see is_deleted below).
24 * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
25 * feed must be specified by explicit selectors (see EntitySelector below for
26 * more info).
27 *
28 * Generated from protobuf field <code>string id = 1;</code>
29 */
30 protected $id = '';
31 /**
32 * Whether this entity is to be deleted. Relevant only for incremental
33 * fetches.
34 *
35 * Generated from protobuf field <code>bool is_deleted = 2;</code>
36 */
37 protected $is_deleted = false;
38 /**
39 * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
40 */
41 protected $extension = null;
42 protected $element;
43
44 /**
45 * Constructor.
46 *
47 * @param array $data {
48 * Optional. Data for populating the Message object.
49 *
50 * @type string $id
51 * The ids are used only to provide incrementality support. The id should be
52 * unique within a FeedMessage. Consequent FeedMessages may contain
53 * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
54 * FeedEntity with some id will replace the old FeedEntity with the same id
55 * (or delete it - see is_deleted below).
56 * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
57 * feed must be specified by explicit selectors (see EntitySelector below for
58 * more info).
59 * @type bool $is_deleted
60 * Whether this entity is to be deleted. Relevant only for incremental
61 * fetches.
62 * @type \Gtfs\Agency $agency
63 * @type \Gtfs\Stop $stop
64 * @type \Gtfs\Route $route
65 * @type \Gtfs\Trip $trip
66 * @type \Gtfs\StopTime $stop_time
67 * @type \Gtfs\Calendar $calendar
68 * @type \Gtfs\CalendarDate $calendar_date
69 * @type \Gtfs\FareAttribute $fare_attribute
70 * @type \Gtfs\FareRule $fare_rule
71 * @type \Gtfs\Shape $shape
72 * @type \Gtfs\Frequency $frequency
73 * @type \Gtfs\Transfer $transfer
74 * @type \Google\Protobuf\Any $extension
75 * }
76 */
77 public function __construct($data = NULL) {
78 \GPBMetadata\Proto\Gtfs::initOnce();
79 parent::__construct($data);
80 }
81
82 /**
83 * The ids are used only to provide incrementality support. The id should be
84 * unique within a FeedMessage. Consequent FeedMessages may contain
85 * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
86 * FeedEntity with some id will replace the old FeedEntity with the same id
87 * (or delete it - see is_deleted below).
88 * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
89 * feed must be specified by explicit selectors (see EntitySelector below for
90 * more info).
91 *
92 * Generated from protobuf field <code>string id = 1;</code>
93 * @return string
94 */
95 public function getId()
96 {
97 return $this->id;
98 }
99
100 /**
101 * The ids are used only to provide incrementality support. The id should be
102 * unique within a FeedMessage. Consequent FeedMessages may contain
103 * FeedEntities with the same id. In case of a DIFFERENTIAL update the new
104 * FeedEntity with some id will replace the old FeedEntity with the same id
105 * (or delete it - see is_deleted below).
106 * The actual GTFS entities (e.g. stations, routes, trips) referenced by the
107 * feed must be specified by explicit selectors (see EntitySelector below for
108 * more info).
109 *
110 * Generated from protobuf field <code>string id = 1;</code>
111 * @param string $var
112 * @return $this
113 */
114 public function setId($var)
115 {
116 GPBUtil::checkString($var, True);
117 $this->id = $var;
118
119 return $this;
120 }
121
122 /**
123 * Whether this entity is to be deleted. Relevant only for incremental
124 * fetches.
125 *
126 * Generated from protobuf field <code>bool is_deleted = 2;</code>
127 * @return bool
128 */
129 public function getIsDeleted()
130 {
131 return $this->is_deleted;
132 }
133
134 /**
135 * Whether this entity is to be deleted. Relevant only for incremental
136 * fetches.
137 *
138 * Generated from protobuf field <code>bool is_deleted = 2;</code>
139 * @param bool $var
140 * @return $this
141 */
142 public function setIsDeleted($var)
143 {
144 GPBUtil::checkBool($var);
145 $this->is_deleted = $var;
146
147 return $this;
148 }
149
150 /**
151 * Generated from protobuf field <code>.gtfs.Agency agency = 3;</code>
152 * @return \Gtfs\Agency
153 */
154 public function getAgency()
155 {
156 return $this->readOneof(3);
157 }
158
159 /**
160 * Generated from protobuf field <code>.gtfs.Agency agency = 3;</code>
161 * @param \Gtfs\Agency $var
162 * @return $this
163 */
164 public function setAgency($var)
165 {
166 GPBUtil::checkMessage($var, \Gtfs\Agency::class);
167 $this->writeOneof(3, $var);
168
169 return $this;
170 }
171
172 /**
173 * Generated from protobuf field <code>.gtfs.Stop stop = 4;</code>
174 * @return \Gtfs\Stop
175 */
176 public function getStop()
177 {
178 return $this->readOneof(4);
179 }
180
181 /**
182 * Generated from protobuf field <code>.gtfs.Stop stop = 4;</code>
183 * @param \Gtfs\Stop $var
184 * @return $this
185 */
186 public function setStop($var)
187 {
188 GPBUtil::checkMessage($var, \Gtfs\Stop::class);
189 $this->writeOneof(4, $var);
190
191 return $this;
192 }
193
194 /**
195 * Generated from protobuf field <code>.gtfs.Route route = 5;</code>
196 * @return \Gtfs\Route
197 */
198 public function getRoute()
199 {
200 return $this->readOneof(5);
201 }
202
203 /**
204 * Generated from protobuf field <code>.gtfs.Route route = 5;</code>
205 * @param \Gtfs\Route $var
206 * @return $this
207 */
208 public function setRoute($var)
209 {
210 GPBUtil::checkMessage($var, \Gtfs\Route::class);
211 $this->writeOneof(5, $var);
212
213 return $this;
214 }
215
216 /**
217 * Generated from protobuf field <code>.gtfs.Trip trip = 6;</code>
218 * @return \Gtfs\Trip
219 */
220 public function getTrip()
221 {
222 return $this->readOneof(6);
223 }
224
225 /**
226 * Generated from protobuf field <code>.gtfs.Trip trip = 6;</code>
227 * @param \Gtfs\Trip $var
228 * @return $this
229 */
230 public function setTrip($var)
231 {
232 GPBUtil::checkMessage($var, \Gtfs\Trip::class);
233 $this->writeOneof(6, $var);
234
235 return $this;
236 }
237
238 /**
239 * Generated from protobuf field <code>.gtfs.StopTime stop_time = 7;</code>
240 * @return \Gtfs\StopTime
241 */
242 public function getStopTime()
243 {
244 return $this->readOneof(7);
245 }
246
247 /**
248 * Generated from protobuf field <code>.gtfs.StopTime stop_time = 7;</code>
249 * @param \Gtfs\StopTime $var
250 * @return $this
251 */
252 public function setStopTime($var)
253 {
254 GPBUtil::checkMessage($var, \Gtfs\StopTime::class);
255 $this->writeOneof(7, $var);
256
257 return $this;
258 }
259
260 /**
261 * Generated from protobuf field <code>.gtfs.Calendar calendar = 8;</code>
262 * @return \Gtfs\Calendar
263 */
264 public function getCalendar()
265 {
266 return $this->readOneof(8);
267 }
268
269 /**
270 * Generated from protobuf field <code>.gtfs.Calendar calendar = 8;</code>
271 * @param \Gtfs\Calendar $var
272 * @return $this
273 */
274 public function setCalendar($var)
275 {
276 GPBUtil::checkMessage($var, \Gtfs\Calendar::class);
277 $this->writeOneof(8, $var);
278
279 return $this;
280 }
281
282 /**
283 * Generated from protobuf field <code>.gtfs.CalendarDate calendar_date = 9;</code>
284 * @return \Gtfs\CalendarDate
285 */
286 public function getCalendarDate()
287 {
288 return $this->readOneof(9);
289 }
290
291 /**
292 * Generated from protobuf field <code>.gtfs.CalendarDate calendar_date = 9;</code>
293 * @param \Gtfs\CalendarDate $var
294 * @return $this
295 */
296 public function setCalendarDate($var)
297 {
298 GPBUtil::checkMessage($var, \Gtfs\CalendarDate::class);
299 $this->writeOneof(9, $var);
300
301 return $this;
302 }
303
304 /**
305 * Generated from protobuf field <code>.gtfs.FareAttribute fare_attribute = 10;</code>
306 * @return \Gtfs\FareAttribute
307 */
308 public function getFareAttribute()
309 {
310 return $this->readOneof(10);
311 }
312
313 /**
314 * Generated from protobuf field <code>.gtfs.FareAttribute fare_attribute = 10;</code>
315 * @param \Gtfs\FareAttribute $var
316 * @return $this
317 */
318 public function setFareAttribute($var)
319 {
320 GPBUtil::checkMessage($var, \Gtfs\FareAttribute::class);
321 $this->writeOneof(10, $var);
322
323 return $this;
324 }
325
326 /**
327 * Generated from protobuf field <code>.gtfs.FareRule fare_rule = 11;</code>
328 * @return \Gtfs\FareRule
329 */
330 public function getFareRule()
331 {
332 return $this->readOneof(11);
333 }
334
335 /**
336 * Generated from protobuf field <code>.gtfs.FareRule fare_rule = 11;</code>
337 * @param \Gtfs\FareRule $var
338 * @return $this
339 */
340 public function setFareRule($var)
341 {
342 GPBUtil::checkMessage($var, \Gtfs\FareRule::class);
343 $this->writeOneof(11, $var);
344
345 return $this;
346 }
347
348 /**
349 * Generated from protobuf field <code>.gtfs.Shape shape = 12;</code>
350 * @return \Gtfs\Shape
351 */
352 public function getShape()
353 {
354 return $this->readOneof(12);
355 }
356
357 /**
358 * Generated from protobuf field <code>.gtfs.Shape shape = 12;</code>
359 * @param \Gtfs\Shape $var
360 * @return $this
361 */
362 public function setShape($var)
363 {
364 GPBUtil::checkMessage($var, \Gtfs\Shape::class);
365 $this->writeOneof(12, $var);
366
367 return $this;
368 }
369
370 /**
371 * Generated from protobuf field <code>.gtfs.Frequency frequency = 13;</code>
372 * @return \Gtfs\Frequency
373 */
374 public function getFrequency()
375 {
376 return $this->readOneof(13);
377 }
378
379 /**
380 * Generated from protobuf field <code>.gtfs.Frequency frequency = 13;</code>
381 * @param \Gtfs\Frequency $var
382 * @return $this
383 */
384 public function setFrequency($var)
385 {
386 GPBUtil::checkMessage($var, \Gtfs\Frequency::class);
387 $this->writeOneof(13, $var);
388
389 return $this;
390 }
391
392 /**
393 * Generated from protobuf field <code>.gtfs.Transfer transfer = 14;</code>
394 * @return \Gtfs\Transfer
395 */
396 public function getTransfer()
397 {
398 return $this->readOneof(14);
399 }
400
401 /**
402 * Generated from protobuf field <code>.gtfs.Transfer transfer = 14;</code>
403 * @param \Gtfs\Transfer $var
404 * @return $this
405 */
406 public function setTransfer($var)
407 {
408 GPBUtil::checkMessage($var, \Gtfs\Transfer::class);
409 $this->writeOneof(14, $var);
410
411 return $this;
412 }
413
414 /**
415 * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
416 * @return \Google\Protobuf\Any
417 */
418 public function getExtension()
419 {
420 return $this->extension;
421 }
422
423 /**
424 * Generated from protobuf field <code>.google.protobuf.Any extension = 2000;</code>
425 * @param \Google\Protobuf\Any $var
426 * @return $this
427 */
428 public function setExtension($var)
429 {
430 GPBUtil::checkMessage($var, \Google\Protobuf\Any::class);
431 $this->extension = $var;
432
433 return $this;
434 }
435
436 /**
437 * @return string
438 */
439 public function getElement()
440 {
441 return $this->whichOneof("element");
442 }
443
444}
445