osdm_sys/models/operating_days.rs
1/*
2 * UIC 90918-10 - OSDM
3 *
4 * Specifications for the OSDM API standard. The OSDM specification supports two modes of operation: Retailer Mode and Distributor Mode. The API works identically in both modes, except that in distributor mode the API also returns fare information. The following resources are key to get started: - [Processes](https://osdm.io/spec/processes/) - [Models](https://osdm.io/spec/models/) - [Getting started](https://osdm.io/spec/getting-started/)
5 *
6 * The version of the OpenAPI document: 3.7.0
7 * Contact: osdm@uic.org
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// OperatingDays : Day of public transport operation of which the characteristics are defined in a specific service calendar and which may last more than 24 hours. Provided by OJP.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct OperatingDays {
17 /// Start date of period
18 #[serde(rename = "from")]
19 pub from: String,
20 /// End date of period
21 #[serde(rename = "until")]
22 pub until: String,
23 /// Bit pattern for operating days between start date and end date. The length of the pattern is equal to the number of days from start date to end date. A bit value of '1' indicates that an event actually happens on the day that is represented by the bit position.
24 #[serde(rename = "pattern")]
25 pub pattern: String,
26}
27
28impl OperatingDays {
29 /// Day of public transport operation of which the characteristics are defined in a specific service calendar and which may last more than 24 hours. Provided by OJP.
30 pub fn new(from: String, until: String, pattern: String) -> OperatingDays {
31 OperatingDays {
32 from,
33 until,
34 pattern,
35 }
36 }
37}
38