1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
* UIC 90918-10 - OSDM
*
* 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/)
*
* The version of the OpenAPI document: 3.7.0
* Contact: osdm@uic.org
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// DocumentFormat : Physical format of the document provided in the content field in Mime-Type format, e.g. application/pdf, image/jpeg, etc. Must be filled if the 'content' field is present.
/// Physical format of the document provided in the content field in Mime-Type format, e.g. application/pdf, image/jpeg, etc. Must be filled if the 'content' field is present.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub enum DocumentFormat {
#[serde(rename = "application/pdf")]
ApplicationSlashPdf,
#[serde(rename = "application/vnd.apple.pkpass")]
ApplicationSlashVndApplePkpass,
#[serde(rename = "image/jpeg")]
ImageSlashJpeg,
#[serde(rename = "image/png")]
ImageSlashPng,
#[serde(rename = "text/calendar")]
TextSlashCalendar,
#[serde(rename = "text/html")]
TextSlashHtml,
}
impl std::fmt::Display for DocumentFormat {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::ApplicationSlashPdf => write!(f, "application/pdf"),
Self::ApplicationSlashVndApplePkpass => write!(f, "application/vnd.apple.pkpass"),
Self::ImageSlashJpeg => write!(f, "image/jpeg"),
Self::ImageSlashPng => write!(f, "image/png"),
Self::TextSlashCalendar => write!(f, "text/calendar"),
Self::TextSlashHtml => write!(f, "text/html"),
}
}
}
impl Default for DocumentFormat {
fn default() -> DocumentFormat {
Self::ApplicationSlashPdf
}
}