osdm_sys/models/motorcycle_specification.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct MotorcycleSpecification {
16 /// weight in kg
17 #[serde(rename = "weight")]
18 pub weight: i32,
19 /// size in cm
20 #[serde(rename = "length")]
21 pub length: i32,
22 /// size in cm
23 #[serde(rename = "width")]
24 pub width: i32,
25 /// size in cm
26 #[serde(rename = "height")]
27 pub height: i32,
28 /// Free text description of the brand (e.g. BMW)
29 #[serde(rename = "brand")]
30 pub brand: String,
31 /// Free text description of the model (e.g. X5)
32 #[serde(rename = "model")]
33 pub model: String,
34 /// deprecated use car of type SPECIAL_VEHILE instead
35 #[serde(rename = "isSideCarIncluded", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
36 pub is_side_car_included: Option<Option<bool>>,
37}
38
39impl MotorcycleSpecification {
40 pub fn new(weight: i32, length: i32, width: i32, height: i32, brand: String, model: String) -> MotorcycleSpecification {
41 MotorcycleSpecification {
42 weight,
43 length,
44 width,
45 height,
46 brand,
47 model,
48 is_side_car_included: None,
49 }
50 }
51}
52