Skip to main content

osdm_sys/models/
exchange_operation_response_content.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/// ExchangeOperationResponseContent : Influences whether referenced resources are returned in full or as references only. 
15/// Influences whether referenced resources are returned in full or as references only. 
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
18pub enum ExchangeOperationResponseContent {
19    #[serde(rename = "ALL")]
20    All,
21    #[serde(rename = "EXCHANGEOPERATION")]
22    Exchangeoperation,
23    #[serde(rename = "EXCHANGEOPERATION_EXCHANGEOFFERS")]
24    ExchangeoperationExchangeoffers,
25    #[serde(rename = "EXCHANGEOPERATION_FULFILLMENTS")]
26    ExchangeoperationFulfillments,
27
28}
29
30impl std::fmt::Display for ExchangeOperationResponseContent {
31    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
32        match self {
33            Self::All => write!(f, "ALL"),
34            Self::Exchangeoperation => write!(f, "EXCHANGEOPERATION"),
35            Self::ExchangeoperationExchangeoffers => write!(f, "EXCHANGEOPERATION_EXCHANGEOFFERS"),
36            Self::ExchangeoperationFulfillments => write!(f, "EXCHANGEOPERATION_FULFILLMENTS"),
37        }
38    }
39}
40
41impl Default for ExchangeOperationResponseContent {
42    fn default() -> ExchangeOperationResponseContent {
43        Self::All
44    }
45}
46