osdm_sys/models/
api_version.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/// ApiVersion : Version of the API. The version is used to indicate the version of the API that is being used. The version is in semantic versioning format, e.g. \"3.0.0\" and it is a version released at osdm.io. 
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ApiVersion {
17    /// Version of the API 
18    #[serde(rename = "version")]
19    pub version: String,
20    /// Date after which the API version will no longer be available. 
21    #[serde(rename = "sunset", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
22    pub sunset: Option<Option<String>>,
23    #[serde(rename = "nextVersion", skip_serializing_if = "Option::is_none")]
24    pub next_version: Option<Box<models::ApiNextVersion>>,
25}
26
27impl ApiVersion {
28    /// Version of the API. The version is used to indicate the version of the API that is being used. The version is in semantic versioning format, e.g. \"3.0.0\" and it is a version released at osdm.io. 
29    pub fn new(version: String) -> ApiVersion {
30        ApiVersion {
31            version,
32            sunset: None,
33            next_version: None,
34        }
35    }
36}
37