Skip to content

Commit

Permalink
addition of cause_detail and effect_detail to the spec (google#332)
Browse files Browse the repository at this point in the history
  • Loading branch information
mckenzie-maidl-ibigroup committed Jul 26, 2022
1 parent 8993a24 commit a132709
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
13 changes: 11 additions & 2 deletions gtfs-realtime/proto/gtfs-realtime.proto
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ message Alert {
// Entities whose users we should notify of this alert.
repeated EntitySelector informed_entity = 5;

// Cause of this alert.
// Cause of this alert. If cause_detail is included, then Cause must also be included.
enum Cause {
UNKNOWN_CAUSE = 1;
OTHER_CAUSE = 2; // Not machine-representable.
Expand All @@ -600,7 +600,7 @@ message Alert {
}
optional Cause cause = 6 [default = UNKNOWN_CAUSE];

// What is the effect of this problem on the affected entity.
// What is the effect of this problem on the affected entity. If effect_detail is included, then Effect must also be included.
enum Effect {
NO_SERVICE = 1;
REDUCED_SERVICE = 2;
Expand Down Expand Up @@ -656,6 +656,15 @@ message Alert {
// or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional TranslatedString image_alternative_text = 16;


// Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional TranslatedString cause_detail = 17;

// Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional TranslatedString effect_detail = 18;

// The extensions namespace allows 3rd-party developers to extend the
// GTFS Realtime Specification in order to add and evaluate new features
Expand Down
6 changes: 4 additions & 2 deletions gtfs-realtime/spec/en/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,10 @@ An alert, indicating some sort of incident in the public transit network.
|------------------|------------|----------------|-------------------|-------------------|
| **active_period** | [TimeRange](#message-timerange) | Optional | Many | Time when the alert should be shown to the user. If missing, the alert will be shown as long as it appears in the feed. If multiple ranges are given, the alert will be shown during all of them. |
| **informed_entity** | [EntitySelector](#message-entityselector) | Required | Many | Entities whose users we should notify of this alert. At least one informed_entity must be provided. |
| **cause** | [Cause](#enum-cause) | Optional | One |
| **effect** | [Effect](#enum-effect) | Optional | One |
| **cause** | [Cause](#enum-cause) | Conditionally Required | One | If cause_detail is included, then Cause must also be included.
| **cause_detail** | [TranslatedString](#message-translatedstring) | Optional | One | Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included. <br><br>**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future.
| **effect** | [Effect](#enum-effect) | Conditionally Required | One | If effect_detail is included, then Effect must also be included.
| **effect_detail** | [TranslatedString](#message-translatedstring) | Optional | One | Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included. <br><br>**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future.
| **url** | [TranslatedString](#message-translatedstring) | Optional | One | The URL which provides additional information about the alert. |
| **header_text** | [TranslatedString](#message-translatedstring) | Required | One | Header for the alert. This plain-text string will be highlighted, for example in boldface. |
| **description_text** | [TranslatedString](#message-translatedstring) | Required | One | Description for the alert. This plain-text string will be formatted as the body of the alert (or shown on an explicit "expand" request by the user). The information in the description should add to the information of the header. |
Expand Down

0 comments on commit a132709

Please sign in to comment.