A SegmentKey
identifies a portion of the user's journey that happens on a
single vehicle.
Proto Definition
message SegmentKey { // The following are identifiers from the GTFS ticketing spec that specify the // ticketing option for a given segment. // If using the stop-only integration, see // https://developers.google.com/travel/transport/guides/partner-integration/stop-only-integration#ticketing_deep_links // Only populated if using GTFS-based integration. string ticketing_trip_id = 1; string from_ticketing_stop_time_id = 2; string to_ticketing_stop_time_id = 3; // Date of the service day as defined at // https://gtfs.org/schedule/reference/#term-definitions // Note that boarding_time and service_date may have different day values. .google.type.Date service_date = 4; // Hour of day must be from 0-23 and leap seconds are not supported. // The time_offset will be a utc_offset of 0:00, i.e. times are specified in // UTC. .google.type.DateTime boarding_time = 5; // Hour of day must be from 0-23 and leap seconds are not supported. // The time_offset will be a utc_offset of 0:00, i.e. times are specified in // UTC. .google.type.DateTime arrival_time = 6; }
JSON Sample
{ "ticketing_trip_id": "123456", "from_ticketing_stop_time_id": "ZRH-1234", "to_ticketing_stop_time_id": "LUZ-1235", "service_date": { "year": 2022, "month": 4, "day": 6 }, "boarding_time": { "year": 2022, "month": 4, "day": 6, "hours": 14, "minutes": 25, "seconds": 0, "nanos": 0, "utc_offset": "0s" }, "arrival_time": { "year": 2022, "month": 4, "day": 6, "hours": 16, "minutes": 25, "seconds": 0, "nanos": 0, "utc_offset": "0s" } }