osdm-sys 0.1.0-alpha.3

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/)
Documentation
/*
 * 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};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct OfferSearchCriteria {
    #[serde(rename = "requestedOfferParts", skip_serializing_if = "Option::is_none")]
    pub requested_offer_parts: Option<Vec<models::OfferPartType>>,
    #[serde(rename = "productTags", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub product_tags: Option<Option<Vec<String>>>,
    /// preselection of products where offers are requested 
    #[serde(rename = "productSelections", skip_serializing_if = "Option::is_none")]
    pub product_selections: Option<Vec<models::ProductRequestOfferSelection>>,
    /// Defines the flexibility levels desired of the fares returned. This refers to the after sales flexibility levels as defined in IRS-90918-10 
    #[serde(rename = "flexibilities", skip_serializing_if = "Option::is_none")]
    pub flexibilities: Option<Vec<String>>,
    /// The classes returned might be different from the requested classes. 
    #[serde(rename = "travelClasses", skip_serializing_if = "Option::is_none")]
    pub travel_classes: Option<Vec<String>>,
    /// The classes returned might be different from the requested classes. 
    #[serde(rename = "serviceClassTypes", skip_serializing_if = "Option::is_none")]
    pub service_class_types: Option<Vec<String>>,
    #[serde(rename = "offerMode", skip_serializing_if = "Option::is_none")]
    pub offer_mode: Option<models::OfferMode>,
    /// ISO 4217 currency codes 
    #[serde(rename = "currency", skip_serializing_if = "Option::is_none")]
    pub currency: Option<String>,
    /// Needs to be provided when creating the collection of outbound travels so that the provider knows when a inbound travel can be expected and propose appropriate product and fares. 
    #[serde(rename = "inboundDate", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub inbound_date: Option<Option<String>>,
}

impl OfferSearchCriteria {
    pub fn new() -> OfferSearchCriteria {
        OfferSearchCriteria {
            requested_offer_parts: None,
            product_tags: None,
            product_selections: None,
            flexibilities: None,
            travel_classes: None,
            service_class_types: None,
            offer_mode: None,
            currency: None,
            inbound_date: None,
        }
    }
}