/*
* 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};
/// NonTripSearchCriteria : Defines the requested validity when searching specifically for a non-trip Offer. The geographical validity can either be specified by a list of nutsCodes, by a list of places (e.g. stations) with the semantics that trips between either of any of the listed stations are covered (e.g. Frankfurt (Main) Hbf, Friedberg(Hess) and Hanau Hbf, which would imply that any travel between these stations is to be covered), or a list of zones (e.g. with carrier urn:vdv:rmv, the zones with the ids 50, 2501 and 3001 would cover the same area as the list of stations above).
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct NonTripSearchCriteria {
#[serde(rename = "validFrom", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub valid_from: Option<Option<String>>,
/// Nomenclature des units territoriales statistiques COMMISSION REGULATION (EU) No 31/2011
#[serde(rename = "nutsCodes", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub nuts_codes: Option<Option<Vec<String>>>,
#[serde(rename = "zones", skip_serializing_if = "Option::is_none")]
pub zones: Option<Vec<models::ZoneDefinition>>,
#[serde(rename = "places", skip_serializing_if = "Option::is_none")]
pub places: Option<Vec<models::PlaceRef>>,
}
impl NonTripSearchCriteria {
/// Defines the requested validity when searching specifically for a non-trip Offer. The geographical validity can either be specified by a list of nutsCodes, by a list of places (e.g. stations) with the semantics that trips between either of any of the listed stations are covered (e.g. Frankfurt (Main) Hbf, Friedberg(Hess) and Hanau Hbf, which would imply that any travel between these stations is to be covered), or a list of zones (e.g. with carrier urn:vdv:rmv, the zones with the ids 50, 2501 and 3001 would cover the same area as the list of stations above).
pub fn new() -> NonTripSearchCriteria {
NonTripSearchCriteria {
valid_from: None,
nuts_codes: None,
zones: None,
places: None,
}
}
}