Skip to main content

lta/
types.rs

1// @generated by satay. Do not edit by hand.
2#![allow(
3    clippy::doc_markdown,
4    clippy::missing_errors_doc,
5    clippy::must_use_candidate,
6    clippy::needless_pass_by_value,
7    clippy::return_self_not_must_use,
8    clippy::single_match_else
9)]
10
11#[cfg(feature = "serde")]
12use satay_runtime::serde_string::{as_bool, as_u8};
13#[cfg(all(feature = "serde", feature = "json"))]
14use satay_runtime::treat_error_as_none;
15#[cfg(feature = "serde")]
16use satay_runtime::{serde_integer, serde_string};
17use std::fmt;
18#[derive(Debug, Clone, PartialEq)]
19#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
20pub struct BusArrivalResponse {
21    /// Fixed-width 5-digit bus stop reference code. This remains a string so leading zeroes are preserved and the wire format is validated.
22    #[cfg_attr(feature = "serde", serde(rename = "BusStopCode"))]
23    pub bus_stop_code: BusStopCode,
24    /// Bus services serving the queried bus stop.
25    #[cfg_attr(feature = "serde", serde(rename = "Services"))]
26    pub services: Vec<BusServiceArrival>,
27}
28#[derive(Debug, Clone, PartialEq)]
29#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
30pub struct BusServiceArrival {
31    /// Bus service number.
32    #[cfg_attr(feature = "serde", serde(rename = "ServiceNo"))]
33    pub service_no: BusServiceNumber,
34    /// Public transport operator code.
35    #[cfg_attr(feature = "serde", serde(rename = "Operator"))]
36    pub operator: BusOperator,
37    #[cfg_attr(
38        feature = "serde",
39        serde(
40            rename = "NextBus",
41            deserialize_with = "treat_error_as_none::deserialize",
42            serialize_with = "treat_error_as_none::serialize",
43            default,
44            skip_serializing_if = "Option::is_none"
45        )
46    )]
47    pub next_bus: Option<BusArrivalTiming>,
48    #[cfg_attr(
49        feature = "serde",
50        serde(
51            rename = "NextBus2",
52            deserialize_with = "treat_error_as_none::deserialize",
53            serialize_with = "treat_error_as_none::serialize",
54            default,
55            skip_serializing_if = "Option::is_none"
56        )
57    )]
58    pub next_bus2: Option<BusArrivalTiming>,
59    #[cfg_attr(
60        feature = "serde",
61        serde(
62            rename = "NextBus3",
63            deserialize_with = "treat_error_as_none::deserialize",
64            serialize_with = "treat_error_as_none::serialize",
65            default,
66            skip_serializing_if = "Option::is_none"
67        )
68    )]
69    pub next_bus3: Option<BusArrivalTiming>,
70}
71/// Public transport operator code.
72#[derive(Debug, Clone, PartialEq, Eq)]
73#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
74pub enum BusOperator {
75    #[cfg_attr(feature = "serde", serde(rename = "SBST"))]
76    Sbst,
77    #[cfg_attr(feature = "serde", serde(rename = "SMRT"))]
78    Smrt,
79    #[cfg_attr(feature = "serde", serde(rename = "TTS"))]
80    Tts,
81    #[cfg_attr(feature = "serde", serde(rename = "GAS"))]
82    Gas,
83}
84impl BusOperator {
85    pub const fn as_str(&self) -> &'static str {
86        match self {
87            Self::Sbst => "SBST",
88            Self::Smrt => "SMRT",
89            Self::Tts => "TTS",
90            Self::Gas => "GAS",
91        }
92    }
93}
94impl AsRef<str> for BusOperator {
95    fn as_ref(&self) -> &str {
96        self.as_str()
97    }
98}
99impl fmt::Display for BusOperator {
100    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
101        f.write_str(self.as_str())
102    }
103}
104/// Bus service number.
105#[nutype::nutype(
106    validate(regex = "^[a-zA-Z0-9]+$", len_char_max = 5),
107    derive(
108        Debug, Clone, PartialEq, Eq, PartialOrd, Ord, AsRef, Deref, TryFrom, Into, Display, Hash
109    ),
110    cfg_attr(feature = "serde", derive(Serialize, Deserialize))
111)]
112pub struct BusServiceNumber(String);
113/// Fixed-width 5-digit bus stop reference code. This remains a string so leading zeroes are preserved and the wire format is validated.
114#[nutype::nutype(
115    validate(regex = "^[0-9]{5}$"),
116    derive(
117        Debug, Clone, PartialEq, Eq, PartialOrd, Ord, AsRef, Deref, TryFrom, Into, Display, Hash
118    ),
119    cfg_attr(feature = "serde", derive(Serialize, Deserialize))
120)]
121pub struct BusStopCode(String);
122/// Fixed-width 4-digit traffic camera identifier. This remains a string so Satay validates and preserves the identifier's wire representation.
123#[nutype::nutype(
124    validate(regex = "^[0-9]{4}$"),
125    derive(
126        Debug, Clone, PartialEq, Eq, PartialOrd, Ord, AsRef, Deref, TryFrom, Into, Display, Hash
127    ),
128    cfg_attr(feature = "serde", derive(Serialize, Deserialize))
129)]
130pub struct CameraId(String);
131/// Fixed-width 9-digit road link identifier. This remains a string because the value identifies a link rather than representing a quantity.
132#[nutype::nutype(
133    validate(regex = "^[0-9]{9}$"),
134    derive(
135        Debug, Clone, PartialEq, Eq, PartialOrd, Ord, AsRef, Deref, TryFrom, Into, Display, Hash
136    ),
137    cfg_attr(feature = "serde", derive(Serialize, Deserialize))
138)]
139pub struct LinkId(String);
140/// Fixed-width 3-character taxi stand reference code: a single zone letter followed by two digits. This remains a string so Satay validates and preserves the identifier's wire representation.
141#[nutype::nutype(
142    validate(regex = "^[A-Z][0-9]{2}$"),
143    derive(
144        Debug, Clone, PartialEq, Eq, PartialOrd, Ord, AsRef, Deref, TryFrom, Into, Display, Hash
145    ),
146    cfg_attr(feature = "serde", derive(Serialize, Deserialize))
147)]
148pub struct TaxiCode(String);
149/// LTA traffic-speed classification from 1 through 8. Values outside these bounds are undefined and are rejected by the generated validation type.
150#[nutype::nutype(
151    validate(greater_or_equal = 1, less_or_equal = 8),
152    derive(
153        Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, AsRef, Deref, TryFrom, Into, Display
154    ),
155    cfg_attr(feature = "serde", derive(Serialize, Deserialize))
156)]
157pub struct SpeedBand(u8);
158/// Geodetic latitude in decimal degrees. The -90 through 90 bounds are the valid latitude domain and reject impossible coordinates.
159#[nutype::nutype(
160    validate(finite, greater_or_equal = -90.0, less_or_equal = 90.0),
161    derive(
162        Debug,
163        Clone,
164        Copy,
165        PartialEq,
166        PartialOrd,
167        AsRef,
168        Deref,
169        TryFrom,
170        Into,
171        Display
172    ),
173    cfg_attr(feature = "serde", derive(Serialize, Deserialize)),
174)]
175pub struct Latitude(f64);
176/// Geodetic longitude in decimal degrees. The -180 through 180 bounds are the valid longitude domain and reject impossible coordinates.
177#[nutype::nutype(
178    validate(finite, greater_or_equal = -180.0, less_or_equal = 180.0),
179    derive(
180        Debug,
181        Clone,
182        Copy,
183        PartialEq,
184        PartialOrd,
185        AsRef,
186        Deref,
187        TryFrom,
188        Into,
189        Display
190    ),
191    cfg_attr(feature = "serde", derive(Serialize, Deserialize)),
192)]
193pub struct Longitude(f64);
194#[derive(Debug, Clone, PartialEq)]
195#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
196pub struct BusArrivalTiming {
197    /// Fixed-width 5-digit bus stop reference code. This remains a string so leading zeroes are preserved and the wire format is validated.
198    #[cfg_attr(feature = "serde", serde(rename = "OriginCode"))]
199    pub origin_code: BusStopCode,
200    /// Fixed-width 5-digit bus stop reference code. This remains a string so leading zeroes are preserved and the wire format is validated.
201    #[cfg_attr(feature = "serde", serde(rename = "DestinationCode"))]
202    pub destination_code: BusStopCode,
203    /// Estimated arrival date-time in Singapore Standard Time.
204    #[cfg_attr(
205        feature = "serde",
206        serde(rename = "EstimatedArrival", with = "serde_string::as_offset_datetime")
207    )]
208    pub estimated_arrival: satay_runtime::OffsetDateTime,
209    /// Current estimated latitude of the bus.
210    #[cfg_attr(
211        feature = "serde",
212        serde(rename = "Latitude", with = "serde_string::as_f64")
213    )]
214    pub latitude: f64,
215    /// Current estimated longitude of the bus.
216    #[cfg_attr(
217        feature = "serde",
218        serde(rename = "Longitude", with = "serde_string::as_f64")
219    )]
220    pub longitude: f64,
221    /// Ordinal visit number of this vehicle at the bus stop.
222    #[cfg_attr(
223        feature = "serde",
224        serde(rename = "VisitNumber", with = "serde_string::as_u8")
225    )]
226    pub visit_number: u8,
227    /// Current occupancy level.
228    #[cfg_attr(feature = "serde", serde(rename = "Load"))]
229    pub load: BusArrivalTimingLoad,
230    /// Wheelchair accessibility indicator.
231    #[cfg_attr(feature = "serde", serde(rename = "Feature"))]
232    pub feature: BusArrivalTimingFeature,
233    /// Vehicle type of the bus.
234    #[cfg_attr(feature = "serde", serde(rename = "Type"))]
235    pub r#type: BusArrivalTimingType,
236    /// Whether the bus is currently monitored by the system.
237    #[cfg_attr(
238        feature = "serde",
239        serde(rename = "Monitored", with = "serde_integer::as_bool")
240    )]
241    pub monitored: bool,
242}
243#[derive(Debug, Clone, PartialEq)]
244#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
245pub struct BusStopsResponse {
246    /// Bus stops in this response page.
247    pub value: Vec<BusStop>,
248}
249#[derive(Debug, Clone, PartialEq)]
250#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
251pub struct BusStop {
252    /// Fixed-width 5-digit bus stop reference code. This remains a string so leading zeroes are preserved and the wire format is validated.
253    #[cfg_attr(feature = "serde", serde(rename = "BusStopCode"))]
254    pub bus_stop_code: BusStopCode,
255    /// Road on which the bus stop is located.
256    #[cfg_attr(feature = "serde", serde(rename = "RoadName"))]
257    pub road_name: String,
258    /// Bus stop landmark or location description.
259    #[cfg_attr(feature = "serde", serde(rename = "Description"))]
260    pub desc: String,
261    /// Geodetic latitude in decimal degrees. The -90 through 90 bounds are the valid latitude domain and reject impossible coordinates.
262    #[cfg_attr(feature = "serde", serde(rename = "Latitude"))]
263    pub lat: Latitude,
264    /// Geodetic longitude in decimal degrees. The -180 through 180 bounds are the valid longitude domain and reject impossible coordinates.
265    #[cfg_attr(feature = "serde", serde(rename = "Longitude"))]
266    pub long: Longitude,
267}
268#[derive(Debug, Clone, PartialEq)]
269#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
270pub struct TrafficImagesResponse {
271    /// Traffic camera images in this response page.
272    pub value: Vec<TrafficImage>,
273}
274#[derive(Debug, Clone, PartialEq)]
275#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
276pub struct TrafficImage {
277    /// Fixed-width 4-digit traffic camera identifier. This remains a string so Satay validates and preserves the identifier's wire representation.
278    #[cfg_attr(feature = "serde", serde(rename = "CameraID"))]
279    pub camera_id: CameraId,
280    /// Geodetic latitude in decimal degrees. The -90 through 90 bounds are the valid latitude domain and reject impossible coordinates.
281    #[cfg_attr(feature = "serde", serde(rename = "Latitude"))]
282    pub lat: Latitude,
283    /// Geodetic longitude in decimal degrees. The -180 through 180 bounds are the valid longitude domain and reject impossible coordinates.
284    #[cfg_attr(feature = "serde", serde(rename = "Longitude"))]
285    pub long: Longitude,
286    /// URL of the latest image from the traffic camera.
287    #[cfg_attr(feature = "serde", serde(rename = "ImageLink"))]
288    pub image_link: String,
289}
290#[derive(Debug, Clone, PartialEq)]
291#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
292pub struct TrafficSpeedBandsResponse {
293    /// Traffic speed bands in this response page.
294    pub value: Vec<TrafficSpeedBand>,
295}
296#[derive(Debug, Clone, PartialEq)]
297#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
298pub struct TrafficSpeedBand {
299    /// Fixed-width 9-digit road link identifier. This remains a string because the value identifies a link rather than representing a quantity.
300    #[cfg_attr(feature = "serde", serde(rename = "LinkID"))]
301    pub link_id: LinkId,
302    /// Name of the road.
303    #[cfg_attr(feature = "serde", serde(rename = "RoadName"))]
304    pub road_name: String,
305    /// Classification of the road carrying the traffic-speed reading.
306    #[cfg_attr(feature = "serde", serde(rename = "RoadCategory"))]
307    pub road_category: RoadCategory,
308    /// LTA traffic-speed classification from 1 through 8. Values outside these bounds are undefined and are rejected by the generated validation type.
309    #[cfg_attr(feature = "serde", serde(rename = "SpeedBand"))]
310    pub speed_band: SpeedBand,
311    /// Lower speed bound in kilometres per hour. Non-sentinel values fit in an unsigned 8-bit integer.
312    #[cfg_attr(
313        feature = "serde",
314        serde(rename = "MinimumSpeed", with = "serde_string::as_u8")
315    )]
316    pub min_speed: u8,
317    /// Upper speed bound in kilometres per hour. DataMall uses 999 for the open-ended 70 km/h-and-above band, which decodes as None.
318    #[cfg_attr(
319        feature = "serde",
320        serde(
321            rename = "MaximumSpeed",
322            deserialize_with = "TrafficSpeedBand::__satay_deserialize_max_speed_none_if",
323            serialize_with = "TrafficSpeedBand::__satay_serialize_max_speed_none_if"
324        )
325    )]
326    pub max_speed: Option<u8>,
327    /// Longitude of the road link's start point.
328    #[cfg_attr(
329        feature = "serde",
330        serde(rename = "StartLon", with = "serde_string::as_f64")
331    )]
332    pub start_lon: f64,
333    /// Latitude of the road link's start point.
334    #[cfg_attr(
335        feature = "serde",
336        serde(rename = "StartLat", with = "serde_string::as_f64")
337    )]
338    pub start_lat: f64,
339    /// Longitude of the road link's end point.
340    #[cfg_attr(
341        feature = "serde",
342        serde(rename = "EndLon", with = "serde_string::as_f64")
343    )]
344    pub end_lon: f64,
345    /// Latitude of the road link's end point.
346    #[cfg_attr(
347        feature = "serde",
348        serde(rename = "EndLat", with = "serde_string::as_f64")
349    )]
350    pub end_lat: f64,
351}
352#[cfg(feature = "serde")]
353impl TrafficSpeedBand {
354    fn __satay_deserialize_max_speed_none_if<'de, D>(
355        deserializer: D,
356    ) -> Result<Option<u8>, D::Error>
357    where
358        D: serde::Deserializer<'de>,
359    {
360        as_u8::deserialize_none_if(deserializer, &["999"])
361    }
362    #[allow(
363        clippy::ref_option,
364        clippy::trivially_copy_pass_by_ref,
365        reason = "Serde `serialize_with` receives a reference to the field type"
366    )]
367    fn __satay_serialize_max_speed_none_if<S>(
368        value: &Option<u8>,
369        serializer: S,
370    ) -> Result<S::Ok, S::Error>
371    where
372        S: serde::Serializer,
373    {
374        as_u8::serialize_none_if(value, "999", serializer)
375    }
376}
377/// Classification of the road carrying the traffic-speed reading.
378#[derive(Debug, Clone, PartialEq, Eq)]
379pub enum RoadCategory {
380    Expressway,
381    MajorArterialRoads,
382    ArterialRoads,
383    MinorArterialRoads,
384    SmallRoads,
385    SlipRoads,
386    NoCategoryInfoAvail,
387    Other(String),
388}
389impl RoadCategory {
390    pub fn as_str(&self) -> &str {
391        match self {
392            Self::Expressway => "A",
393            Self::MajorArterialRoads => "B",
394            Self::ArterialRoads => "C",
395            Self::MinorArterialRoads => "D",
396            Self::SmallRoads => "E",
397            Self::SlipRoads => "F",
398            Self::NoCategoryInfoAvail => "G",
399            Self::Other(value) => value.as_str(),
400        }
401    }
402}
403impl AsRef<str> for RoadCategory {
404    fn as_ref(&self) -> &str {
405        self.as_str()
406    }
407}
408impl fmt::Display for RoadCategory {
409    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
410        f.write_str(self.as_str())
411    }
412}
413#[cfg(feature = "serde")]
414impl serde::Serialize for RoadCategory {
415    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
416    where
417        S: serde::Serializer,
418    {
419        serializer.serialize_str(self.as_str())
420    }
421}
422#[cfg(feature = "serde")]
423impl<'de> serde::Deserialize<'de> for RoadCategory {
424    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
425    where
426        D: serde::Deserializer<'de>,
427    {
428        let value = String::deserialize(deserializer)?;
429        Ok(match value.as_str() {
430            "A" => Self::Expressway,
431            "B" => Self::MajorArterialRoads,
432            "C" => Self::ArterialRoads,
433            "D" => Self::MinorArterialRoads,
434            "E" => Self::SmallRoads,
435            "F" => Self::SlipRoads,
436            "G" => Self::NoCategoryInfoAvail,
437            _ => Self::Other(value),
438        })
439    }
440}
441#[derive(Debug, Clone, PartialEq)]
442#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
443pub struct TrafficFlowResponse {
444    /// Traffic flow data files in this response.
445    pub value: Vec<TrafficFlowLink>,
446}
447#[derive(Debug, Clone, PartialEq)]
448#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
449pub struct TrafficFlowLink {
450    /// URL of the traffic flow data file.
451    #[cfg_attr(feature = "serde", serde(rename = "Link"))]
452    pub link: String,
453}
454#[derive(Debug, Clone, PartialEq)]
455#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
456pub struct TrafficIncidentsResponse {
457    /// Traffic incidents in this response page.
458    pub value: Vec<TrafficIncident>,
459}
460#[derive(Debug, Clone, PartialEq)]
461#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
462pub struct TrafficIncident {
463    /// Type of traffic incident.
464    #[cfg_attr(feature = "serde", serde(rename = "Type"))]
465    pub incident_type: IncidentType,
466    /// Geodetic latitude in decimal degrees. The -90 through 90 bounds are the valid latitude domain and reject impossible coordinates.
467    #[cfg_attr(feature = "serde", serde(rename = "Latitude"))]
468    pub lat: Latitude,
469    /// Geodetic longitude in decimal degrees. The -180 through 180 bounds are the valid longitude domain and reject impossible coordinates.
470    #[cfg_attr(feature = "serde", serde(rename = "Longitude"))]
471    pub long: Longitude,
472    /// Human-readable description of the traffic incident.
473    #[cfg_attr(feature = "serde", serde(rename = "Message"))]
474    pub msg: String,
475}
476/// Type of traffic incident.
477#[derive(Debug, Clone, PartialEq, Eq)]
478pub enum IncidentType {
479    Accident,
480    RoadWorks,
481    VehicleBreakdown,
482    Weather,
483    Obstacle,
484    RoadBlock,
485    HeavyTraffic,
486    Misc,
487    Diversion,
488    UnattendedVehicle,
489    Roadwork,
490    Other(String),
491}
492impl IncidentType {
493    pub fn as_str(&self) -> &str {
494        match self {
495            Self::Accident => "Accident",
496            Self::RoadWorks => "Road Works",
497            Self::VehicleBreakdown => "Vehicle breakdown",
498            Self::Weather => "Weather",
499            Self::Obstacle => "Obstacle",
500            Self::RoadBlock => "Road Block",
501            Self::HeavyTraffic => "Heavy Traffic",
502            Self::Misc => "Misc.",
503            Self::Diversion => "Diversion",
504            Self::UnattendedVehicle => "Unattended Vehicle",
505            Self::Roadwork => "Roadwork",
506            Self::Other(value) => value.as_str(),
507        }
508    }
509}
510impl AsRef<str> for IncidentType {
511    fn as_ref(&self) -> &str {
512        self.as_str()
513    }
514}
515impl fmt::Display for IncidentType {
516    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
517        f.write_str(self.as_str())
518    }
519}
520#[cfg(feature = "serde")]
521impl serde::Serialize for IncidentType {
522    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
523    where
524        S: serde::Serializer,
525    {
526        serializer.serialize_str(self.as_str())
527    }
528}
529#[cfg(feature = "serde")]
530impl<'de> serde::Deserialize<'de> for IncidentType {
531    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
532    where
533        D: serde::Deserializer<'de>,
534    {
535        let value = String::deserialize(deserializer)?;
536        Ok(match value.as_str() {
537            "Accident" => Self::Accident,
538            "Road Works" => Self::RoadWorks,
539            "Vehicle breakdown" => Self::VehicleBreakdown,
540            "Weather" => Self::Weather,
541            "Obstacle" => Self::Obstacle,
542            "Road Block" => Self::RoadBlock,
543            "Heavy Traffic" => Self::HeavyTraffic,
544            "Misc." => Self::Misc,
545            "Diversion" => Self::Diversion,
546            "Unattended Vehicle" => Self::UnattendedVehicle,
547            "Roadwork" => Self::Roadwork,
548            _ => Self::Other(value),
549        })
550    }
551}
552/// Unique identifier of a road work or road opening event. Its numeric groups use ASCII digits so the generated validator matches the wire ID.
553#[nutype::nutype(
554    validate(regex = "^[A-Z]+-[0-9]{6}-[0-9]{4}$"),
555    derive(
556        Debug, Clone, PartialEq, Eq, PartialOrd, Ord, AsRef, Deref, TryFrom, Into, Display, Hash
557    ),
558    cfg_attr(feature = "serde", derive(Serialize, Deserialize))
559)]
560pub struct EventId(String);
561#[derive(Debug, Clone, PartialEq)]
562#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
563pub struct RoadWorksResponse {
564    /// Road works in this response page.
565    pub value: Vec<RoadDetails>,
566}
567#[derive(Debug, Clone, PartialEq)]
568#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
569pub struct RoadDetails {
570    /// Unique identifier of a road work or road opening event. Its numeric groups use ASCII digits so the generated validator matches the wire ID.
571    #[cfg_attr(feature = "serde", serde(rename = "EventID"))]
572    pub event_id: EventId,
573    /// Date on which the road work starts.
574    #[cfg_attr(
575        feature = "serde",
576        serde(rename = "StartDate", with = "serde_string::as_date")
577    )]
578    pub start_date: satay_runtime::Date,
579    /// Date on which the road work ends.
580    #[cfg_attr(
581        feature = "serde",
582        serde(rename = "EndDate", with = "serde_string::as_date")
583    )]
584    pub end_date: satay_runtime::Date,
585    /// Agency responsible for the road work.
586    #[cfg_attr(feature = "serde", serde(rename = "SvcDept"))]
587    pub service_dept: String,
588    /// Name of the road affected by the road work.
589    #[cfg_attr(feature = "serde", serde(rename = "RoadName"))]
590    pub road_name: String,
591    /// Additional information about the road work.
592    #[cfg_attr(feature = "serde", serde(rename = "Other"))]
593    pub other: String,
594}
595#[derive(Debug, Clone, PartialEq)]
596#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
597pub struct RoadOpeningsResponse {
598    /// Road openings in this response page.
599    pub value: Vec<RoadDetails>,
600}
601#[derive(Debug, Clone, PartialEq)]
602#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
603pub struct TaxiAvailabilityResponse {
604    /// Coordinates of available taxis in this response page.
605    pub value: Vec<Coordinates>,
606}
607#[derive(Debug, Clone, PartialEq)]
608#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
609pub struct Coordinates {
610    /// Geodetic latitude in decimal degrees. The -90 through 90 bounds are the valid latitude domain and reject impossible coordinates.
611    #[cfg_attr(feature = "serde", serde(rename = "Latitude"))]
612    pub lat: Latitude,
613    /// Geodetic longitude in decimal degrees. The -180 through 180 bounds are the valid longitude domain and reject impossible coordinates.
614    #[cfg_attr(feature = "serde", serde(rename = "Longitude"))]
615    pub long: Longitude,
616}
617#[derive(Debug, Clone, PartialEq)]
618#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
619pub struct TaxiStandsResponse {
620    /// Taxi stands in this response page.
621    pub value: Vec<TaxiStand>,
622}
623#[derive(Debug, Clone, PartialEq)]
624#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
625pub struct TaxiStand {
626    /// Fixed-width 3-character taxi stand reference code: a single zone letter followed by two digits. This remains a string so Satay validates and preserves the identifier's wire representation.
627    #[cfg_attr(feature = "serde", serde(rename = "TaxiCode"))]
628    pub taxi_code: TaxiCode,
629    /// Geodetic latitude in decimal degrees. The -90 through 90 bounds are the valid latitude domain and reject impossible coordinates.
630    #[cfg_attr(feature = "serde", serde(rename = "Latitude"))]
631    pub lat: Latitude,
632    /// Geodetic longitude in decimal degrees. The -180 through 180 bounds are the valid longitude domain and reject impossible coordinates.
633    #[cfg_attr(feature = "serde", serde(rename = "Longitude"))]
634    pub long: Longitude,
635    /// Barrier-free accessibility indicator.
636    #[cfg_attr(
637        feature = "serde",
638        serde(
639            rename = "Bfa",
640            deserialize_with = "TaxiStand::__satay_deserialize_is_barrier_free_bool_mapping",
641            serialize_with = "TaxiStand::__satay_serialize_is_barrier_free_bool_mapping"
642        )
643    )]
644    pub is_barrier_free: bool,
645    /// Owner of the taxi stand.
646    #[cfg_attr(feature = "serde", serde(rename = "Ownership"))]
647    pub owner: TaxiStandOwner,
648    /// Classification of the taxi stand.
649    #[cfg_attr(feature = "serde", serde(rename = "Type"))]
650    pub stand_type: TaxiStandType,
651    /// Name or location description of the taxi stand.
652    #[cfg_attr(feature = "serde", serde(rename = "Name"))]
653    pub name: String,
654}
655#[cfg(feature = "serde")]
656impl TaxiStand {
657    fn __satay_deserialize_is_barrier_free_bool_mapping<'de, D>(
658        deserializer: D,
659    ) -> Result<bool, D::Error>
660    where
661        D: serde::Deserializer<'de>,
662    {
663        as_bool::deserialize_mapped(deserializer, &["Yes"], &["No"], Some(false))
664    }
665    #[allow(
666        clippy::trivially_copy_pass_by_ref,
667        reason = "Serde `serialize_with` receives a reference to the field type"
668    )]
669    fn __satay_serialize_is_barrier_free_bool_mapping<S>(
670        value: &bool,
671        serializer: S,
672    ) -> Result<S::Ok, S::Error>
673    where
674        S: serde::Serializer,
675    {
676        as_bool::serialize_mapped(value, "Yes", "No", serializer)
677    }
678}
679/// Owner of the taxi stand.
680#[derive(Debug, Clone, PartialEq, Eq)]
681pub enum TaxiStandOwner {
682    Lta,
683    Ccs,
684    Private,
685    Other(String),
686}
687impl TaxiStandOwner {
688    pub fn as_str(&self) -> &str {
689        match self {
690            Self::Lta => "LTA",
691            Self::Ccs => "CCS",
692            Self::Private => "Private",
693            Self::Other(value) => value.as_str(),
694        }
695    }
696}
697impl AsRef<str> for TaxiStandOwner {
698    fn as_ref(&self) -> &str {
699        self.as_str()
700    }
701}
702impl fmt::Display for TaxiStandOwner {
703    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
704        f.write_str(self.as_str())
705    }
706}
707#[cfg(feature = "serde")]
708impl serde::Serialize for TaxiStandOwner {
709    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
710    where
711        S: serde::Serializer,
712    {
713        serializer.serialize_str(self.as_str())
714    }
715}
716#[cfg(feature = "serde")]
717impl<'de> serde::Deserialize<'de> for TaxiStandOwner {
718    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
719    where
720        D: serde::Deserializer<'de>,
721    {
722        let value = String::deserialize(deserializer)?;
723        Ok(match value.as_str() {
724            "LTA" => Self::Lta,
725            "CCS" => Self::Ccs,
726            "Private" => Self::Private,
727            _ => Self::Other(value),
728        })
729    }
730}
731/// Classification of the taxi stand.
732#[derive(Debug, Clone, PartialEq, Eq)]
733pub enum TaxiStandType {
734    Stand,
735    Stop,
736    Other(String),
737}
738impl TaxiStandType {
739    pub fn as_str(&self) -> &str {
740        match self {
741            Self::Stand => "Stand",
742            Self::Stop => "Stop",
743            Self::Other(value) => value.as_str(),
744        }
745    }
746}
747impl AsRef<str> for TaxiStandType {
748    fn as_ref(&self) -> &str {
749        self.as_str()
750    }
751}
752impl fmt::Display for TaxiStandType {
753    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
754        f.write_str(self.as_str())
755    }
756}
757#[cfg(feature = "serde")]
758impl serde::Serialize for TaxiStandType {
759    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
760    where
761        S: serde::Serializer,
762    {
763        serializer.serialize_str(self.as_str())
764    }
765}
766#[cfg(feature = "serde")]
767impl<'de> serde::Deserialize<'de> for TaxiStandType {
768    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
769    where
770        D: serde::Deserializer<'de>,
771    {
772        let value = String::deserialize(deserializer)?;
773        Ok(match value.as_str() {
774            "Stand" => Self::Stand,
775            "Stop" => Self::Stop,
776            _ => Self::Other(value),
777        })
778    }
779}
780#[derive(Debug, Clone, PartialEq)]
781#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
782pub struct FacilitiesMaintenanceResponse {
783    /// Facility maintenance data files for the queried station.
784    pub value: Vec<FacilityMaintenanceLink>,
785}
786#[derive(Debug, Clone, PartialEq)]
787#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
788pub struct FacilityMaintenanceLink {
789    /// URL of the facility maintenance data file for the queried station.
790    #[cfg_attr(feature = "serde", serde(rename = "Link"))]
791    pub link: String,
792}
793/// MRT/LRT station code.
794#[derive(Debug, Clone, PartialEq, Eq)]
795#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
796pub enum StationCode {
797    #[cfg_attr(feature = "serde", serde(rename = "NS1"))]
798    Ns1,
799    #[cfg_attr(feature = "serde", serde(rename = "NS2"))]
800    Ns2,
801    #[cfg_attr(feature = "serde", serde(rename = "NS3"))]
802    Ns3,
803    #[cfg_attr(feature = "serde", serde(rename = "NS3A"))]
804    Ns3a,
805    #[cfg_attr(feature = "serde", serde(rename = "NS4"))]
806    Ns4,
807    #[cfg_attr(feature = "serde", serde(rename = "NS5"))]
808    Ns5,
809    #[cfg_attr(feature = "serde", serde(rename = "NS6"))]
810    Ns6,
811    #[cfg_attr(feature = "serde", serde(rename = "NS7"))]
812    Ns7,
813    #[cfg_attr(feature = "serde", serde(rename = "NS8"))]
814    Ns8,
815    #[cfg_attr(feature = "serde", serde(rename = "NS9"))]
816    Ns9,
817    #[cfg_attr(feature = "serde", serde(rename = "NS10"))]
818    Ns10,
819    #[cfg_attr(feature = "serde", serde(rename = "NS11"))]
820    Ns11,
821    #[cfg_attr(feature = "serde", serde(rename = "NS12"))]
822    Ns12,
823    #[cfg_attr(feature = "serde", serde(rename = "NS13"))]
824    Ns13,
825    #[cfg_attr(feature = "serde", serde(rename = "NS14"))]
826    Ns14,
827    #[cfg_attr(feature = "serde", serde(rename = "NS15"))]
828    Ns15,
829    #[cfg_attr(feature = "serde", serde(rename = "NS16"))]
830    Ns16,
831    #[cfg_attr(feature = "serde", serde(rename = "NS17"))]
832    Ns17,
833    #[cfg_attr(feature = "serde", serde(rename = "NS18"))]
834    Ns18,
835    #[cfg_attr(feature = "serde", serde(rename = "NS19"))]
836    Ns19,
837    #[cfg_attr(feature = "serde", serde(rename = "NS20"))]
838    Ns20,
839    #[cfg_attr(feature = "serde", serde(rename = "NS21"))]
840    Ns21,
841    #[cfg_attr(feature = "serde", serde(rename = "NS22"))]
842    Ns22,
843    #[cfg_attr(feature = "serde", serde(rename = "NS23"))]
844    Ns23,
845    #[cfg_attr(feature = "serde", serde(rename = "NS24"))]
846    Ns24,
847    #[cfg_attr(feature = "serde", serde(rename = "NS25"))]
848    Ns25,
849    #[cfg_attr(feature = "serde", serde(rename = "NS26"))]
850    Ns26,
851    #[cfg_attr(feature = "serde", serde(rename = "NS27"))]
852    Ns27,
853    #[cfg_attr(feature = "serde", serde(rename = "NS28"))]
854    Ns28,
855    #[cfg_attr(feature = "serde", serde(rename = "EW1"))]
856    Ew1,
857    #[cfg_attr(feature = "serde", serde(rename = "EW2"))]
858    Ew2,
859    #[cfg_attr(feature = "serde", serde(rename = "EW3"))]
860    Ew3,
861    #[cfg_attr(feature = "serde", serde(rename = "EW4"))]
862    Ew4,
863    #[cfg_attr(feature = "serde", serde(rename = "EW5"))]
864    Ew5,
865    #[cfg_attr(feature = "serde", serde(rename = "EW6"))]
866    Ew6,
867    #[cfg_attr(feature = "serde", serde(rename = "EW7"))]
868    Ew7,
869    #[cfg_attr(feature = "serde", serde(rename = "EW8"))]
870    Ew8,
871    #[cfg_attr(feature = "serde", serde(rename = "EW9"))]
872    Ew9,
873    #[cfg_attr(feature = "serde", serde(rename = "EW10"))]
874    Ew10,
875    #[cfg_attr(feature = "serde", serde(rename = "EW11"))]
876    Ew11,
877    #[cfg_attr(feature = "serde", serde(rename = "EW12"))]
878    Ew12,
879    #[cfg_attr(feature = "serde", serde(rename = "EW13"))]
880    Ew13,
881    #[cfg_attr(feature = "serde", serde(rename = "EW14"))]
882    Ew14,
883    #[cfg_attr(feature = "serde", serde(rename = "EW15"))]
884    Ew15,
885    #[cfg_attr(feature = "serde", serde(rename = "EW16"))]
886    Ew16,
887    #[cfg_attr(feature = "serde", serde(rename = "EW17"))]
888    Ew17,
889    #[cfg_attr(feature = "serde", serde(rename = "EW18"))]
890    Ew18,
891    #[cfg_attr(feature = "serde", serde(rename = "EW19"))]
892    Ew19,
893    #[cfg_attr(feature = "serde", serde(rename = "EW20"))]
894    Ew20,
895    #[cfg_attr(feature = "serde", serde(rename = "EW21"))]
896    Ew21,
897    #[cfg_attr(feature = "serde", serde(rename = "EW22"))]
898    Ew22,
899    #[cfg_attr(feature = "serde", serde(rename = "EW23"))]
900    Ew23,
901    #[cfg_attr(feature = "serde", serde(rename = "EW24"))]
902    Ew24,
903    #[cfg_attr(feature = "serde", serde(rename = "EW25"))]
904    Ew25,
905    #[cfg_attr(feature = "serde", serde(rename = "EW26"))]
906    Ew26,
907    #[cfg_attr(feature = "serde", serde(rename = "EW27"))]
908    Ew27,
909    #[cfg_attr(feature = "serde", serde(rename = "EW28"))]
910    Ew28,
911    #[cfg_attr(feature = "serde", serde(rename = "EW29"))]
912    Ew29,
913    #[cfg_attr(feature = "serde", serde(rename = "EW30"))]
914    Ew30,
915    #[cfg_attr(feature = "serde", serde(rename = "EW31"))]
916    Ew31,
917    #[cfg_attr(feature = "serde", serde(rename = "EW32"))]
918    Ew32,
919    #[cfg_attr(feature = "serde", serde(rename = "EW33"))]
920    Ew33,
921    #[cfg_attr(feature = "serde", serde(rename = "CG"))]
922    Cg,
923    #[cfg_attr(feature = "serde", serde(rename = "CG1"))]
924    Cg1,
925    #[cfg_attr(feature = "serde", serde(rename = "CG2"))]
926    Cg2,
927    #[cfg_attr(feature = "serde", serde(rename = "NE1"))]
928    Ne1,
929    #[cfg_attr(feature = "serde", serde(rename = "NE2"))]
930    Ne2,
931    #[cfg_attr(feature = "serde", serde(rename = "NE3"))]
932    Ne3,
933    #[cfg_attr(feature = "serde", serde(rename = "NE4"))]
934    Ne4,
935    #[cfg_attr(feature = "serde", serde(rename = "NE5"))]
936    Ne5,
937    #[cfg_attr(feature = "serde", serde(rename = "NE6"))]
938    Ne6,
939    #[cfg_attr(feature = "serde", serde(rename = "NE7"))]
940    Ne7,
941    #[cfg_attr(feature = "serde", serde(rename = "NE8"))]
942    Ne8,
943    #[cfg_attr(feature = "serde", serde(rename = "NE9"))]
944    Ne9,
945    #[cfg_attr(feature = "serde", serde(rename = "NE10"))]
946    Ne10,
947    #[cfg_attr(feature = "serde", serde(rename = "NE11"))]
948    Ne11,
949    #[cfg_attr(feature = "serde", serde(rename = "NE12"))]
950    Ne12,
951    #[cfg_attr(feature = "serde", serde(rename = "NE13"))]
952    Ne13,
953    #[cfg_attr(feature = "serde", serde(rename = "NE14"))]
954    Ne14,
955    #[cfg_attr(feature = "serde", serde(rename = "NE15"))]
956    Ne15,
957    #[cfg_attr(feature = "serde", serde(rename = "NE16"))]
958    Ne16,
959    #[cfg_attr(feature = "serde", serde(rename = "NE17"))]
960    Ne17,
961    #[cfg_attr(feature = "serde", serde(rename = "CC1"))]
962    Cc1,
963    #[cfg_attr(feature = "serde", serde(rename = "CC2"))]
964    Cc2,
965    #[cfg_attr(feature = "serde", serde(rename = "CC3"))]
966    Cc3,
967    #[cfg_attr(feature = "serde", serde(rename = "CC4"))]
968    Cc4,
969    #[cfg_attr(feature = "serde", serde(rename = "CC5"))]
970    Cc5,
971    #[cfg_attr(feature = "serde", serde(rename = "CC6"))]
972    Cc6,
973    #[cfg_attr(feature = "serde", serde(rename = "CC7"))]
974    Cc7,
975    #[cfg_attr(feature = "serde", serde(rename = "CC8"))]
976    Cc8,
977    #[cfg_attr(feature = "serde", serde(rename = "CC9"))]
978    Cc9,
979    #[cfg_attr(feature = "serde", serde(rename = "CC10"))]
980    Cc10,
981    #[cfg_attr(feature = "serde", serde(rename = "CC11"))]
982    Cc11,
983    #[cfg_attr(feature = "serde", serde(rename = "CC12"))]
984    Cc12,
985    #[cfg_attr(feature = "serde", serde(rename = "CC13"))]
986    Cc13,
987    #[cfg_attr(feature = "serde", serde(rename = "CC14"))]
988    Cc14,
989    #[cfg_attr(feature = "serde", serde(rename = "CC15"))]
990    Cc15,
991    #[cfg_attr(feature = "serde", serde(rename = "CC16"))]
992    Cc16,
993    #[cfg_attr(feature = "serde", serde(rename = "CC17"))]
994    Cc17,
995    #[cfg_attr(feature = "serde", serde(rename = "CC18"))]
996    Cc18,
997    #[cfg_attr(feature = "serde", serde(rename = "CC19"))]
998    Cc19,
999    #[cfg_attr(feature = "serde", serde(rename = "CC20"))]
1000    Cc20,
1001    #[cfg_attr(feature = "serde", serde(rename = "CC21"))]
1002    Cc21,
1003    #[cfg_attr(feature = "serde", serde(rename = "CC22"))]
1004    Cc22,
1005    #[cfg_attr(feature = "serde", serde(rename = "CC23"))]
1006    Cc23,
1007    #[cfg_attr(feature = "serde", serde(rename = "CC24"))]
1008    Cc24,
1009    #[cfg_attr(feature = "serde", serde(rename = "CC25"))]
1010    Cc25,
1011    #[cfg_attr(feature = "serde", serde(rename = "CC26"))]
1012    Cc26,
1013    #[cfg_attr(feature = "serde", serde(rename = "CC27"))]
1014    Cc27,
1015    #[cfg_attr(feature = "serde", serde(rename = "CC28"))]
1016    Cc28,
1017    #[cfg_attr(feature = "serde", serde(rename = "CC29"))]
1018    Cc29,
1019    #[cfg_attr(feature = "serde", serde(rename = "CC30"))]
1020    Cc30,
1021    #[cfg_attr(feature = "serde", serde(rename = "CC31"))]
1022    Cc31,
1023    #[cfg_attr(feature = "serde", serde(rename = "CC32"))]
1024    Cc32,
1025    #[cfg_attr(feature = "serde", serde(rename = "CC33"))]
1026    Cc33,
1027    #[cfg_attr(feature = "serde", serde(rename = "CC34"))]
1028    Cc34,
1029    #[cfg_attr(feature = "serde", serde(rename = "CE1"))]
1030    Ce1,
1031    #[cfg_attr(feature = "serde", serde(rename = "CE2"))]
1032    Ce2,
1033    #[cfg_attr(feature = "serde", serde(rename = "DT1"))]
1034    Dt1,
1035    #[cfg_attr(feature = "serde", serde(rename = "DT2"))]
1036    Dt2,
1037    #[cfg_attr(feature = "serde", serde(rename = "DT3"))]
1038    Dt3,
1039    #[cfg_attr(feature = "serde", serde(rename = "DT4"))]
1040    Dt4,
1041    #[cfg_attr(feature = "serde", serde(rename = "DT5"))]
1042    Dt5,
1043    #[cfg_attr(feature = "serde", serde(rename = "DT6"))]
1044    Dt6,
1045    #[cfg_attr(feature = "serde", serde(rename = "DT7"))]
1046    Dt7,
1047    #[cfg_attr(feature = "serde", serde(rename = "DT8"))]
1048    Dt8,
1049    #[cfg_attr(feature = "serde", serde(rename = "DT9"))]
1050    Dt9,
1051    #[cfg_attr(feature = "serde", serde(rename = "DT10"))]
1052    Dt10,
1053    #[cfg_attr(feature = "serde", serde(rename = "DT11"))]
1054    Dt11,
1055    #[cfg_attr(feature = "serde", serde(rename = "DT12"))]
1056    Dt12,
1057    #[cfg_attr(feature = "serde", serde(rename = "DT13"))]
1058    Dt13,
1059    #[cfg_attr(feature = "serde", serde(rename = "DT14"))]
1060    Dt14,
1061    #[cfg_attr(feature = "serde", serde(rename = "DT15"))]
1062    Dt15,
1063    #[cfg_attr(feature = "serde", serde(rename = "DT16"))]
1064    Dt16,
1065    #[cfg_attr(feature = "serde", serde(rename = "DT17"))]
1066    Dt17,
1067    #[cfg_attr(feature = "serde", serde(rename = "DT18"))]
1068    Dt18,
1069    #[cfg_attr(feature = "serde", serde(rename = "DT19"))]
1070    Dt19,
1071    #[cfg_attr(feature = "serde", serde(rename = "DT20"))]
1072    Dt20,
1073    #[cfg_attr(feature = "serde", serde(rename = "DT21"))]
1074    Dt21,
1075    #[cfg_attr(feature = "serde", serde(rename = "DT22"))]
1076    Dt22,
1077    #[cfg_attr(feature = "serde", serde(rename = "DT23"))]
1078    Dt23,
1079    #[cfg_attr(feature = "serde", serde(rename = "DT24"))]
1080    Dt24,
1081    #[cfg_attr(feature = "serde", serde(rename = "DT25"))]
1082    Dt25,
1083    #[cfg_attr(feature = "serde", serde(rename = "DT26"))]
1084    Dt26,
1085    #[cfg_attr(feature = "serde", serde(rename = "DT27"))]
1086    Dt27,
1087    #[cfg_attr(feature = "serde", serde(rename = "DT28"))]
1088    Dt28,
1089    #[cfg_attr(feature = "serde", serde(rename = "DT29"))]
1090    Dt29,
1091    #[cfg_attr(feature = "serde", serde(rename = "DT30"))]
1092    Dt30,
1093    #[cfg_attr(feature = "serde", serde(rename = "DT31"))]
1094    Dt31,
1095    #[cfg_attr(feature = "serde", serde(rename = "DT32"))]
1096    Dt32,
1097    #[cfg_attr(feature = "serde", serde(rename = "DT33"))]
1098    Dt33,
1099    #[cfg_attr(feature = "serde", serde(rename = "DT34"))]
1100    Dt34,
1101    #[cfg_attr(feature = "serde", serde(rename = "DT35"))]
1102    Dt35,
1103    #[cfg_attr(feature = "serde", serde(rename = "DT36"))]
1104    Dt36,
1105    #[cfg_attr(feature = "serde", serde(rename = "DT37"))]
1106    Dt37,
1107    #[cfg_attr(feature = "serde", serde(rename = "DE1"))]
1108    De1,
1109    #[cfg_attr(feature = "serde", serde(rename = "DE2"))]
1110    De2,
1111    #[cfg_attr(feature = "serde", serde(rename = "TE1"))]
1112    Te1,
1113    #[cfg_attr(feature = "serde", serde(rename = "TE2"))]
1114    Te2,
1115    #[cfg_attr(feature = "serde", serde(rename = "TE3"))]
1116    Te3,
1117    #[cfg_attr(feature = "serde", serde(rename = "TE4"))]
1118    Te4,
1119    #[cfg_attr(feature = "serde", serde(rename = "TE5"))]
1120    Te5,
1121    #[cfg_attr(feature = "serde", serde(rename = "TE6"))]
1122    Te6,
1123    #[cfg_attr(feature = "serde", serde(rename = "TE7"))]
1124    Te7,
1125    #[cfg_attr(feature = "serde", serde(rename = "TE8"))]
1126    Te8,
1127    #[cfg_attr(feature = "serde", serde(rename = "TE9"))]
1128    Te9,
1129    #[cfg_attr(feature = "serde", serde(rename = "TE10"))]
1130    Te10,
1131    #[cfg_attr(feature = "serde", serde(rename = "TE11"))]
1132    Te11,
1133    #[cfg_attr(feature = "serde", serde(rename = "TE12"))]
1134    Te12,
1135    #[cfg_attr(feature = "serde", serde(rename = "TE13"))]
1136    Te13,
1137    #[cfg_attr(feature = "serde", serde(rename = "TE14"))]
1138    Te14,
1139    #[cfg_attr(feature = "serde", serde(rename = "TE15"))]
1140    Te15,
1141    #[cfg_attr(feature = "serde", serde(rename = "TE16"))]
1142    Te16,
1143    #[cfg_attr(feature = "serde", serde(rename = "TE17"))]
1144    Te17,
1145    #[cfg_attr(feature = "serde", serde(rename = "TE18"))]
1146    Te18,
1147    #[cfg_attr(feature = "serde", serde(rename = "TE19"))]
1148    Te19,
1149    #[cfg_attr(feature = "serde", serde(rename = "TE20"))]
1150    Te20,
1151    #[cfg_attr(feature = "serde", serde(rename = "TE21"))]
1152    Te21,
1153    #[cfg_attr(feature = "serde", serde(rename = "TE22"))]
1154    Te22,
1155    #[cfg_attr(feature = "serde", serde(rename = "TE22A"))]
1156    Te22a,
1157    #[cfg_attr(feature = "serde", serde(rename = "TE23"))]
1158    Te23,
1159    #[cfg_attr(feature = "serde", serde(rename = "TE24"))]
1160    Te24,
1161    #[cfg_attr(feature = "serde", serde(rename = "TE25"))]
1162    Te25,
1163    #[cfg_attr(feature = "serde", serde(rename = "TE26"))]
1164    Te26,
1165    #[cfg_attr(feature = "serde", serde(rename = "TE27"))]
1166    Te27,
1167    #[cfg_attr(feature = "serde", serde(rename = "TE28"))]
1168    Te28,
1169    #[cfg_attr(feature = "serde", serde(rename = "TE29"))]
1170    Te29,
1171    #[cfg_attr(feature = "serde", serde(rename = "TE30"))]
1172    Te30,
1173    #[cfg_attr(feature = "serde", serde(rename = "TE31"))]
1174    Te31,
1175    #[cfg_attr(feature = "serde", serde(rename = "TE32"))]
1176    Te32,
1177    #[cfg_attr(feature = "serde", serde(rename = "BP1"))]
1178    Bp1,
1179    #[cfg_attr(feature = "serde", serde(rename = "BP2"))]
1180    Bp2,
1181    #[cfg_attr(feature = "serde", serde(rename = "BP3"))]
1182    Bp3,
1183    #[cfg_attr(feature = "serde", serde(rename = "BP4"))]
1184    Bp4,
1185    #[cfg_attr(feature = "serde", serde(rename = "BP5"))]
1186    Bp5,
1187    #[cfg_attr(feature = "serde", serde(rename = "BP6"))]
1188    Bp6,
1189    #[cfg_attr(feature = "serde", serde(rename = "BP7"))]
1190    Bp7,
1191    #[cfg_attr(feature = "serde", serde(rename = "BP8"))]
1192    Bp8,
1193    #[cfg_attr(feature = "serde", serde(rename = "BP9"))]
1194    Bp9,
1195    #[cfg_attr(feature = "serde", serde(rename = "BP10"))]
1196    Bp10,
1197    #[cfg_attr(feature = "serde", serde(rename = "BP11"))]
1198    Bp11,
1199    #[cfg_attr(feature = "serde", serde(rename = "BP12"))]
1200    Bp12,
1201    #[cfg_attr(feature = "serde", serde(rename = "BP13"))]
1202    Bp13,
1203    #[cfg_attr(feature = "serde", serde(rename = "BP14"))]
1204    Bp14,
1205    #[cfg_attr(feature = "serde", serde(rename = "STC"))]
1206    Stc,
1207    #[cfg_attr(feature = "serde", serde(rename = "SE1"))]
1208    Se1,
1209    #[cfg_attr(feature = "serde", serde(rename = "SE2"))]
1210    Se2,
1211    #[cfg_attr(feature = "serde", serde(rename = "SE3"))]
1212    Se3,
1213    #[cfg_attr(feature = "serde", serde(rename = "SE4"))]
1214    Se4,
1215    #[cfg_attr(feature = "serde", serde(rename = "SE5"))]
1216    Se5,
1217    #[cfg_attr(feature = "serde", serde(rename = "SW1"))]
1218    Sw1,
1219    #[cfg_attr(feature = "serde", serde(rename = "SW2"))]
1220    Sw2,
1221    #[cfg_attr(feature = "serde", serde(rename = "SW3"))]
1222    Sw3,
1223    #[cfg_attr(feature = "serde", serde(rename = "SW4"))]
1224    Sw4,
1225    #[cfg_attr(feature = "serde", serde(rename = "SW5"))]
1226    Sw5,
1227    #[cfg_attr(feature = "serde", serde(rename = "SW6"))]
1228    Sw6,
1229    #[cfg_attr(feature = "serde", serde(rename = "SW7"))]
1230    Sw7,
1231    #[cfg_attr(feature = "serde", serde(rename = "SW8"))]
1232    Sw8,
1233    #[cfg_attr(feature = "serde", serde(rename = "PTC"))]
1234    Ptc,
1235    #[cfg_attr(feature = "serde", serde(rename = "PE1"))]
1236    Pe1,
1237    #[cfg_attr(feature = "serde", serde(rename = "PE2"))]
1238    Pe2,
1239    #[cfg_attr(feature = "serde", serde(rename = "PE3"))]
1240    Pe3,
1241    #[cfg_attr(feature = "serde", serde(rename = "PE4"))]
1242    Pe4,
1243    #[cfg_attr(feature = "serde", serde(rename = "PE5"))]
1244    Pe5,
1245    #[cfg_attr(feature = "serde", serde(rename = "PE6"))]
1246    Pe6,
1247    #[cfg_attr(feature = "serde", serde(rename = "PE7"))]
1248    Pe7,
1249    #[cfg_attr(feature = "serde", serde(rename = "PW1"))]
1250    Pw1,
1251    #[cfg_attr(feature = "serde", serde(rename = "PW2"))]
1252    Pw2,
1253    #[cfg_attr(feature = "serde", serde(rename = "PW3"))]
1254    Pw3,
1255    #[cfg_attr(feature = "serde", serde(rename = "PW4"))]
1256    Pw4,
1257    #[cfg_attr(feature = "serde", serde(rename = "PW5"))]
1258    Pw5,
1259    #[cfg_attr(feature = "serde", serde(rename = "PW6"))]
1260    Pw6,
1261    #[cfg_attr(feature = "serde", serde(rename = "PW7"))]
1262    Pw7,
1263    #[cfg_attr(feature = "serde", serde(rename = "CR1"))]
1264    Cr1,
1265    #[cfg_attr(feature = "serde", serde(rename = "CR2"))]
1266    Cr2,
1267    #[cfg_attr(feature = "serde", serde(rename = "CR3"))]
1268    Cr3,
1269    #[cfg_attr(feature = "serde", serde(rename = "CR4"))]
1270    Cr4,
1271    #[cfg_attr(feature = "serde", serde(rename = "CR5"))]
1272    Cr5,
1273    #[cfg_attr(feature = "serde", serde(rename = "CR6"))]
1274    Cr6,
1275    #[cfg_attr(feature = "serde", serde(rename = "CR7"))]
1276    Cr7,
1277    #[cfg_attr(feature = "serde", serde(rename = "CR8"))]
1278    Cr8,
1279    #[cfg_attr(feature = "serde", serde(rename = "CR9"))]
1280    Cr9,
1281    #[cfg_attr(feature = "serde", serde(rename = "CR10"))]
1282    Cr10,
1283    #[cfg_attr(feature = "serde", serde(rename = "CR11"))]
1284    Cr11,
1285    #[cfg_attr(feature = "serde", serde(rename = "CR12"))]
1286    Cr12,
1287    #[cfg_attr(feature = "serde", serde(rename = "CR13"))]
1288    Cr13,
1289    #[cfg_attr(feature = "serde", serde(rename = "CR14"))]
1290    Cr14,
1291    #[cfg_attr(feature = "serde", serde(rename = "CR15"))]
1292    Cr15,
1293    #[cfg_attr(feature = "serde", serde(rename = "CR16"))]
1294    Cr16,
1295    #[cfg_attr(feature = "serde", serde(rename = "CR17"))]
1296    Cr17,
1297    #[cfg_attr(feature = "serde", serde(rename = "CR18"))]
1298    Cr18,
1299    #[cfg_attr(feature = "serde", serde(rename = "CR19"))]
1300    Cr19,
1301    #[cfg_attr(feature = "serde", serde(rename = "CR20"))]
1302    Cr20,
1303    #[cfg_attr(feature = "serde", serde(rename = "CR21"))]
1304    Cr21,
1305    #[cfg_attr(feature = "serde", serde(rename = "CR22"))]
1306    Cr22,
1307    #[cfg_attr(feature = "serde", serde(rename = "CR23"))]
1308    Cr23,
1309    #[cfg_attr(feature = "serde", serde(rename = "CP1"))]
1310    Cp1,
1311    #[cfg_attr(feature = "serde", serde(rename = "CP2"))]
1312    Cp2,
1313    #[cfg_attr(feature = "serde", serde(rename = "CP3"))]
1314    Cp3,
1315    #[cfg_attr(feature = "serde", serde(rename = "CP4"))]
1316    Cp4,
1317    #[cfg_attr(feature = "serde", serde(rename = "JS1"))]
1318    Js1,
1319    #[cfg_attr(feature = "serde", serde(rename = "JS2"))]
1320    Js2,
1321    #[cfg_attr(feature = "serde", serde(rename = "JS2A"))]
1322    Js2a,
1323    #[cfg_attr(feature = "serde", serde(rename = "JS3"))]
1324    Js3,
1325    #[cfg_attr(feature = "serde", serde(rename = "JS4"))]
1326    Js4,
1327    #[cfg_attr(feature = "serde", serde(rename = "JS5"))]
1328    Js5,
1329    #[cfg_attr(feature = "serde", serde(rename = "JS6"))]
1330    Js6,
1331    #[cfg_attr(feature = "serde", serde(rename = "JS7"))]
1332    Js7,
1333    #[cfg_attr(feature = "serde", serde(rename = "JS8"))]
1334    Js8,
1335    #[cfg_attr(feature = "serde", serde(rename = "JS9"))]
1336    Js9,
1337    #[cfg_attr(feature = "serde", serde(rename = "JS10"))]
1338    Js10,
1339    #[cfg_attr(feature = "serde", serde(rename = "JS11"))]
1340    Js11,
1341    #[cfg_attr(feature = "serde", serde(rename = "JS12"))]
1342    Js12,
1343    #[cfg_attr(feature = "serde", serde(rename = "JW1"))]
1344    Jw1,
1345    #[cfg_attr(feature = "serde", serde(rename = "JW2"))]
1346    Jw2,
1347    #[cfg_attr(feature = "serde", serde(rename = "JW3"))]
1348    Jw3,
1349    #[cfg_attr(feature = "serde", serde(rename = "JW4"))]
1350    Jw4,
1351    #[cfg_attr(feature = "serde", serde(rename = "JW5"))]
1352    Jw5,
1353    #[cfg_attr(feature = "serde", serde(rename = "JE1"))]
1354    Je1,
1355    #[cfg_attr(feature = "serde", serde(rename = "JE2"))]
1356    Je2,
1357    #[cfg_attr(feature = "serde", serde(rename = "JE3"))]
1358    Je3,
1359    #[cfg_attr(feature = "serde", serde(rename = "JE4"))]
1360    Je4,
1361    #[cfg_attr(feature = "serde", serde(rename = "JE5"))]
1362    Je5,
1363    #[cfg_attr(feature = "serde", serde(rename = "JE6"))]
1364    Je6,
1365    #[cfg_attr(feature = "serde", serde(rename = "JE7"))]
1366    Je7,
1367}
1368impl StationCode {
1369    pub const fn as_str(&self) -> &'static str {
1370        match self {
1371            Self::Ns1 => "NS1",
1372            Self::Ns2 => "NS2",
1373            Self::Ns3 => "NS3",
1374            Self::Ns3a => "NS3A",
1375            Self::Ns4 => "NS4",
1376            Self::Ns5 => "NS5",
1377            Self::Ns6 => "NS6",
1378            Self::Ns7 => "NS7",
1379            Self::Ns8 => "NS8",
1380            Self::Ns9 => "NS9",
1381            Self::Ns10 => "NS10",
1382            Self::Ns11 => "NS11",
1383            Self::Ns12 => "NS12",
1384            Self::Ns13 => "NS13",
1385            Self::Ns14 => "NS14",
1386            Self::Ns15 => "NS15",
1387            Self::Ns16 => "NS16",
1388            Self::Ns17 => "NS17",
1389            Self::Ns18 => "NS18",
1390            Self::Ns19 => "NS19",
1391            Self::Ns20 => "NS20",
1392            Self::Ns21 => "NS21",
1393            Self::Ns22 => "NS22",
1394            Self::Ns23 => "NS23",
1395            Self::Ns24 => "NS24",
1396            Self::Ns25 => "NS25",
1397            Self::Ns26 => "NS26",
1398            Self::Ns27 => "NS27",
1399            Self::Ns28 => "NS28",
1400            Self::Ew1 => "EW1",
1401            Self::Ew2 => "EW2",
1402            Self::Ew3 => "EW3",
1403            Self::Ew4 => "EW4",
1404            Self::Ew5 => "EW5",
1405            Self::Ew6 => "EW6",
1406            Self::Ew7 => "EW7",
1407            Self::Ew8 => "EW8",
1408            Self::Ew9 => "EW9",
1409            Self::Ew10 => "EW10",
1410            Self::Ew11 => "EW11",
1411            Self::Ew12 => "EW12",
1412            Self::Ew13 => "EW13",
1413            Self::Ew14 => "EW14",
1414            Self::Ew15 => "EW15",
1415            Self::Ew16 => "EW16",
1416            Self::Ew17 => "EW17",
1417            Self::Ew18 => "EW18",
1418            Self::Ew19 => "EW19",
1419            Self::Ew20 => "EW20",
1420            Self::Ew21 => "EW21",
1421            Self::Ew22 => "EW22",
1422            Self::Ew23 => "EW23",
1423            Self::Ew24 => "EW24",
1424            Self::Ew25 => "EW25",
1425            Self::Ew26 => "EW26",
1426            Self::Ew27 => "EW27",
1427            Self::Ew28 => "EW28",
1428            Self::Ew29 => "EW29",
1429            Self::Ew30 => "EW30",
1430            Self::Ew31 => "EW31",
1431            Self::Ew32 => "EW32",
1432            Self::Ew33 => "EW33",
1433            Self::Cg => "CG",
1434            Self::Cg1 => "CG1",
1435            Self::Cg2 => "CG2",
1436            Self::Ne1 => "NE1",
1437            Self::Ne2 => "NE2",
1438            Self::Ne3 => "NE3",
1439            Self::Ne4 => "NE4",
1440            Self::Ne5 => "NE5",
1441            Self::Ne6 => "NE6",
1442            Self::Ne7 => "NE7",
1443            Self::Ne8 => "NE8",
1444            Self::Ne9 => "NE9",
1445            Self::Ne10 => "NE10",
1446            Self::Ne11 => "NE11",
1447            Self::Ne12 => "NE12",
1448            Self::Ne13 => "NE13",
1449            Self::Ne14 => "NE14",
1450            Self::Ne15 => "NE15",
1451            Self::Ne16 => "NE16",
1452            Self::Ne17 => "NE17",
1453            Self::Cc1 => "CC1",
1454            Self::Cc2 => "CC2",
1455            Self::Cc3 => "CC3",
1456            Self::Cc4 => "CC4",
1457            Self::Cc5 => "CC5",
1458            Self::Cc6 => "CC6",
1459            Self::Cc7 => "CC7",
1460            Self::Cc8 => "CC8",
1461            Self::Cc9 => "CC9",
1462            Self::Cc10 => "CC10",
1463            Self::Cc11 => "CC11",
1464            Self::Cc12 => "CC12",
1465            Self::Cc13 => "CC13",
1466            Self::Cc14 => "CC14",
1467            Self::Cc15 => "CC15",
1468            Self::Cc16 => "CC16",
1469            Self::Cc17 => "CC17",
1470            Self::Cc18 => "CC18",
1471            Self::Cc19 => "CC19",
1472            Self::Cc20 => "CC20",
1473            Self::Cc21 => "CC21",
1474            Self::Cc22 => "CC22",
1475            Self::Cc23 => "CC23",
1476            Self::Cc24 => "CC24",
1477            Self::Cc25 => "CC25",
1478            Self::Cc26 => "CC26",
1479            Self::Cc27 => "CC27",
1480            Self::Cc28 => "CC28",
1481            Self::Cc29 => "CC29",
1482            Self::Cc30 => "CC30",
1483            Self::Cc31 => "CC31",
1484            Self::Cc32 => "CC32",
1485            Self::Cc33 => "CC33",
1486            Self::Cc34 => "CC34",
1487            Self::Ce1 => "CE1",
1488            Self::Ce2 => "CE2",
1489            Self::Dt1 => "DT1",
1490            Self::Dt2 => "DT2",
1491            Self::Dt3 => "DT3",
1492            Self::Dt4 => "DT4",
1493            Self::Dt5 => "DT5",
1494            Self::Dt6 => "DT6",
1495            Self::Dt7 => "DT7",
1496            Self::Dt8 => "DT8",
1497            Self::Dt9 => "DT9",
1498            Self::Dt10 => "DT10",
1499            Self::Dt11 => "DT11",
1500            Self::Dt12 => "DT12",
1501            Self::Dt13 => "DT13",
1502            Self::Dt14 => "DT14",
1503            Self::Dt15 => "DT15",
1504            Self::Dt16 => "DT16",
1505            Self::Dt17 => "DT17",
1506            Self::Dt18 => "DT18",
1507            Self::Dt19 => "DT19",
1508            Self::Dt20 => "DT20",
1509            Self::Dt21 => "DT21",
1510            Self::Dt22 => "DT22",
1511            Self::Dt23 => "DT23",
1512            Self::Dt24 => "DT24",
1513            Self::Dt25 => "DT25",
1514            Self::Dt26 => "DT26",
1515            Self::Dt27 => "DT27",
1516            Self::Dt28 => "DT28",
1517            Self::Dt29 => "DT29",
1518            Self::Dt30 => "DT30",
1519            Self::Dt31 => "DT31",
1520            Self::Dt32 => "DT32",
1521            Self::Dt33 => "DT33",
1522            Self::Dt34 => "DT34",
1523            Self::Dt35 => "DT35",
1524            Self::Dt36 => "DT36",
1525            Self::Dt37 => "DT37",
1526            Self::De1 => "DE1",
1527            Self::De2 => "DE2",
1528            Self::Te1 => "TE1",
1529            Self::Te2 => "TE2",
1530            Self::Te3 => "TE3",
1531            Self::Te4 => "TE4",
1532            Self::Te5 => "TE5",
1533            Self::Te6 => "TE6",
1534            Self::Te7 => "TE7",
1535            Self::Te8 => "TE8",
1536            Self::Te9 => "TE9",
1537            Self::Te10 => "TE10",
1538            Self::Te11 => "TE11",
1539            Self::Te12 => "TE12",
1540            Self::Te13 => "TE13",
1541            Self::Te14 => "TE14",
1542            Self::Te15 => "TE15",
1543            Self::Te16 => "TE16",
1544            Self::Te17 => "TE17",
1545            Self::Te18 => "TE18",
1546            Self::Te19 => "TE19",
1547            Self::Te20 => "TE20",
1548            Self::Te21 => "TE21",
1549            Self::Te22 => "TE22",
1550            Self::Te22a => "TE22A",
1551            Self::Te23 => "TE23",
1552            Self::Te24 => "TE24",
1553            Self::Te25 => "TE25",
1554            Self::Te26 => "TE26",
1555            Self::Te27 => "TE27",
1556            Self::Te28 => "TE28",
1557            Self::Te29 => "TE29",
1558            Self::Te30 => "TE30",
1559            Self::Te31 => "TE31",
1560            Self::Te32 => "TE32",
1561            Self::Bp1 => "BP1",
1562            Self::Bp2 => "BP2",
1563            Self::Bp3 => "BP3",
1564            Self::Bp4 => "BP4",
1565            Self::Bp5 => "BP5",
1566            Self::Bp6 => "BP6",
1567            Self::Bp7 => "BP7",
1568            Self::Bp8 => "BP8",
1569            Self::Bp9 => "BP9",
1570            Self::Bp10 => "BP10",
1571            Self::Bp11 => "BP11",
1572            Self::Bp12 => "BP12",
1573            Self::Bp13 => "BP13",
1574            Self::Bp14 => "BP14",
1575            Self::Stc => "STC",
1576            Self::Se1 => "SE1",
1577            Self::Se2 => "SE2",
1578            Self::Se3 => "SE3",
1579            Self::Se4 => "SE4",
1580            Self::Se5 => "SE5",
1581            Self::Sw1 => "SW1",
1582            Self::Sw2 => "SW2",
1583            Self::Sw3 => "SW3",
1584            Self::Sw4 => "SW4",
1585            Self::Sw5 => "SW5",
1586            Self::Sw6 => "SW6",
1587            Self::Sw7 => "SW7",
1588            Self::Sw8 => "SW8",
1589            Self::Ptc => "PTC",
1590            Self::Pe1 => "PE1",
1591            Self::Pe2 => "PE2",
1592            Self::Pe3 => "PE3",
1593            Self::Pe4 => "PE4",
1594            Self::Pe5 => "PE5",
1595            Self::Pe6 => "PE6",
1596            Self::Pe7 => "PE7",
1597            Self::Pw1 => "PW1",
1598            Self::Pw2 => "PW2",
1599            Self::Pw3 => "PW3",
1600            Self::Pw4 => "PW4",
1601            Self::Pw5 => "PW5",
1602            Self::Pw6 => "PW6",
1603            Self::Pw7 => "PW7",
1604            Self::Cr1 => "CR1",
1605            Self::Cr2 => "CR2",
1606            Self::Cr3 => "CR3",
1607            Self::Cr4 => "CR4",
1608            Self::Cr5 => "CR5",
1609            Self::Cr6 => "CR6",
1610            Self::Cr7 => "CR7",
1611            Self::Cr8 => "CR8",
1612            Self::Cr9 => "CR9",
1613            Self::Cr10 => "CR10",
1614            Self::Cr11 => "CR11",
1615            Self::Cr12 => "CR12",
1616            Self::Cr13 => "CR13",
1617            Self::Cr14 => "CR14",
1618            Self::Cr15 => "CR15",
1619            Self::Cr16 => "CR16",
1620            Self::Cr17 => "CR17",
1621            Self::Cr18 => "CR18",
1622            Self::Cr19 => "CR19",
1623            Self::Cr20 => "CR20",
1624            Self::Cr21 => "CR21",
1625            Self::Cr22 => "CR22",
1626            Self::Cr23 => "CR23",
1627            Self::Cp1 => "CP1",
1628            Self::Cp2 => "CP2",
1629            Self::Cp3 => "CP3",
1630            Self::Cp4 => "CP4",
1631            Self::Js1 => "JS1",
1632            Self::Js2 => "JS2",
1633            Self::Js2a => "JS2A",
1634            Self::Js3 => "JS3",
1635            Self::Js4 => "JS4",
1636            Self::Js5 => "JS5",
1637            Self::Js6 => "JS6",
1638            Self::Js7 => "JS7",
1639            Self::Js8 => "JS8",
1640            Self::Js9 => "JS9",
1641            Self::Js10 => "JS10",
1642            Self::Js11 => "JS11",
1643            Self::Js12 => "JS12",
1644            Self::Jw1 => "JW1",
1645            Self::Jw2 => "JW2",
1646            Self::Jw3 => "JW3",
1647            Self::Jw4 => "JW4",
1648            Self::Jw5 => "JW5",
1649            Self::Je1 => "JE1",
1650            Self::Je2 => "JE2",
1651            Self::Je3 => "JE3",
1652            Self::Je4 => "JE4",
1653            Self::Je5 => "JE5",
1654            Self::Je6 => "JE6",
1655            Self::Je7 => "JE7",
1656        }
1657    }
1658}
1659impl AsRef<str> for StationCode {
1660    fn as_ref(&self) -> &str {
1661        self.as_str()
1662    }
1663}
1664impl fmt::Display for StationCode {
1665    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1666        f.write_str(self.as_str())
1667    }
1668}
1669/// Current occupancy level.
1670#[derive(Debug, Clone, PartialEq, Eq)]
1671#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1672pub enum BusArrivalTimingLoad {
1673    #[cfg_attr(feature = "serde", serde(rename = "SEA"))]
1674    SeatsAvailable,
1675    #[cfg_attr(feature = "serde", serde(rename = "SDA"))]
1676    StandingAvailable,
1677    #[cfg_attr(feature = "serde", serde(rename = "LSD"))]
1678    LimitedStanding,
1679    #[cfg_attr(feature = "serde", serde(rename = ""))]
1680    Unspecified,
1681}
1682impl BusArrivalTimingLoad {
1683    pub const fn as_str(&self) -> &'static str {
1684        match self {
1685            Self::SeatsAvailable => "SEA",
1686            Self::StandingAvailable => "SDA",
1687            Self::LimitedStanding => "LSD",
1688            Self::Unspecified => "",
1689        }
1690    }
1691}
1692impl AsRef<str> for BusArrivalTimingLoad {
1693    fn as_ref(&self) -> &str {
1694        self.as_str()
1695    }
1696}
1697impl fmt::Display for BusArrivalTimingLoad {
1698    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1699        f.write_str(self.as_str())
1700    }
1701}
1702/// Wheelchair accessibility indicator.
1703#[derive(Debug, Clone, PartialEq, Eq)]
1704#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1705pub enum BusArrivalTimingFeature {
1706    #[cfg_attr(feature = "serde", serde(rename = "WAB"))]
1707    WheelchairAccessible,
1708    #[cfg_attr(feature = "serde", serde(rename = ""))]
1709    Unspecified,
1710}
1711impl BusArrivalTimingFeature {
1712    pub const fn as_str(&self) -> &'static str {
1713        match self {
1714            Self::WheelchairAccessible => "WAB",
1715            Self::Unspecified => "",
1716        }
1717    }
1718}
1719impl AsRef<str> for BusArrivalTimingFeature {
1720    fn as_ref(&self) -> &str {
1721        self.as_str()
1722    }
1723}
1724impl fmt::Display for BusArrivalTimingFeature {
1725    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1726        f.write_str(self.as_str())
1727    }
1728}
1729/// Vehicle type of the bus.
1730#[derive(Debug, Clone, PartialEq, Eq)]
1731#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1732pub enum BusArrivalTimingType {
1733    #[cfg_attr(feature = "serde", serde(rename = "SD"))]
1734    SingleDecker,
1735    #[cfg_attr(feature = "serde", serde(rename = "DD"))]
1736    DoubleDecker,
1737    #[cfg_attr(feature = "serde", serde(rename = "BD"))]
1738    Bendy,
1739    #[cfg_attr(feature = "serde", serde(rename = ""))]
1740    Unspecified,
1741}
1742impl BusArrivalTimingType {
1743    pub const fn as_str(&self) -> &'static str {
1744        match self {
1745            Self::SingleDecker => "SD",
1746            Self::DoubleDecker => "DD",
1747            Self::Bendy => "BD",
1748            Self::Unspecified => "",
1749        }
1750    }
1751}
1752impl AsRef<str> for BusArrivalTimingType {
1753    fn as_ref(&self) -> &str {
1754        self.as_str()
1755    }
1756}
1757impl fmt::Display for BusArrivalTimingType {
1758    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1759        f.write_str(self.as_str())
1760    }
1761}