osdm_sys/models/
product_search_request.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/// ProductSearchRequest : Search criteria to search for products 
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ProductSearchRequest {
17    /// id of the product 
18    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
19    pub id: Option<String>,
20    #[serde(rename = "types", skip_serializing_if = "Option::is_none")]
21    pub types: Option<Vec<String>>,
22    /// The product codes to be searched. 
23    #[serde(rename = "codes", skip_serializing_if = "Option::is_none")]
24    pub codes: Option<Vec<String>>,
25    #[serde(rename = "flexibilities", skip_serializing_if = "Option::is_none")]
26    pub flexibilities: Option<Vec<String>>,
27    #[serde(rename = "serviceClasses", skip_serializing_if = "Option::is_none")]
28    pub service_classes: Option<Vec<models::ServiceClass>>,
29    #[serde(rename = "travelClasses", skip_serializing_if = "Option::is_none")]
30    pub travel_classes: Option<Vec<String>>,
31    #[serde(rename = "fulfillmentOptions", skip_serializing_if = "Option::is_none")]
32    pub fulfillment_options: Option<Vec<models::FulfillmentOption>>,
33    /// product tags associated with the product
34    #[serde(rename = "productTags", skip_serializing_if = "Option::is_none")]
35    pub product_tags: Option<Vec<String>>,
36}
37
38impl ProductSearchRequest {
39    /// Search criteria to search for products 
40    pub fn new() -> ProductSearchRequest {
41        ProductSearchRequest {
42            id: None,
43            types: None,
44            codes: None,
45            flexibilities: None,
46            service_classes: None,
47            travel_classes: None,
48            fulfillment_options: None,
49            product_tags: None,
50        }
51    }
52}
53