osdm_sys/models/condition.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/// Condition : Describes sales, usage and after sales conditions applicable to the product. See after sales conditions for individual after sales amounts. The language of the text is controlled by the accept-language header, i.e. supporting English is a must.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Condition {
17 #[serde(rename = "type")]
18 pub r#type: String,
19 /// human readable documentation of the text.
20 #[serde(rename = "description")]
21 pub description: String,
22 /// short description of the condition no longer than 64 characters
23 #[serde(rename = "shortDescription", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
24 pub short_description: Option<Option<String>>,
25}
26
27impl Condition {
28 /// Describes sales, usage and after sales conditions applicable to the product. See after sales conditions for individual after sales amounts. The language of the text is controlled by the accept-language header, i.e. supporting English is a must.
29 pub fn new(r#type: String, description: String) -> Condition {
30 Condition {
31 r#type,
32 description,
33 short_description: None,
34 }
35 }
36}
37