Skip to content

Commit 9a7c071

Browse files
vdegoveclaude
andcommitted
Update GTFS-RT protobuf: deprecate active_period, add communication/impact periods
Sync gtfs-realtime.proto with google/transit master and regenerate the Elixir .pb.ex (protoc-gen-elixir 0.15.0, matching mix.lock). The Alert message now deprecates active_period and adds communication_period and impact_period. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 21f84c3 commit 9a7c071

2 files changed

Lines changed: 26 additions & 2 deletions

File tree

apps/transport/lib/transport/protobuf/gtfs-realtime.pb.ex

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,20 @@ defmodule TransitRealtime.Alert do
400400
field(:active_period, 1,
401401
repeated: true,
402402
type: TransitRealtime.TimeRange,
403-
json_name: "activePeriod"
403+
json_name: "activePeriod",
404+
deprecated: true
405+
)
406+
407+
field(:communication_period, 2,
408+
repeated: true,
409+
type: TransitRealtime.TimeRange,
410+
json_name: "communicationPeriod"
411+
)
412+
413+
field(:impact_period, 3,
414+
repeated: true,
415+
type: TransitRealtime.TimeRange,
416+
json_name: "impactPeriod"
404417
)
405418

406419
field(:informed_entity, 5,

apps/transport/lib/transport/protobuf/gtfs-realtime.proto

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,18 @@ message Alert {
625625
// Time when the alert should be shown to the user. If missing, the
626626
// alert will be shown as long as it appears in the feed.
627627
// If multiple ranges are given, the alert will be shown during all of them.
628-
repeated TimeRange active_period = 1;
628+
// Should not be used - for backwards-compatibility only.
629+
repeated TimeRange active_period = 1 [deprecated = true];
630+
631+
// Time when the alert should be shown to the user strictly for informative reasons.
632+
// If missing, the consuming application can decide when it's appropriate to be shown.
633+
// If multiple ranges are given, the alert will be shown during all of them.
634+
repeated TimeRange communication_period = 2;
635+
636+
// Time when the services are affected by the alert. If communication_period is specified,
637+
// every time interval in impact_period must be fully contained within at least
638+
// one time interval of communication_period.
639+
repeated TimeRange impact_period = 3;
629640

630641
// Entities whose users we should notify of this alert.
631642
repeated EntitySelector informed_entity = 5;

0 commit comments

Comments
 (0)