osdm-sys 0.1.0-alpha.2

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};

/// ProductSearchRequest : Search criteria to search for products 
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct ProductSearchRequest {
    /// id of the product 
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "types", skip_serializing_if = "Option::is_none")]
    pub types: Option<Vec<String>>,
    /// The product codes to be searched. 
    #[serde(rename = "codes", skip_serializing_if = "Option::is_none")]
    pub codes: Option<Vec<String>>,
    #[serde(rename = "flexibilities", skip_serializing_if = "Option::is_none")]
    pub flexibilities: Option<Vec<String>>,
    #[serde(rename = "serviceClasses", skip_serializing_if = "Option::is_none")]
    pub service_classes: Option<Vec<models::ServiceClass>>,
    #[serde(rename = "travelClasses", skip_serializing_if = "Option::is_none")]
    pub travel_classes: Option<Vec<String>>,
    #[serde(rename = "fulfillmentOptions", skip_serializing_if = "Option::is_none")]
    pub fulfillment_options: Option<Vec<models::FulfillmentOption>>,
    /// product tags associated with the product
    #[serde(rename = "productTags", skip_serializing_if = "Option::is_none")]
    pub product_tags: Option<Vec<String>>,
}

impl ProductSearchRequest {
    /// Search criteria to search for products 
    pub fn new() -> ProductSearchRequest {
        ProductSearchRequest {
            id: None,
            types: None,
            codes: None,
            flexibilities: None,
            service_classes: None,
            travel_classes: None,
            fulfillment_options: None,
            product_tags: None,
        }
    }
}