osdm_sys/models/
fulfillment_activation_patch_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/// FulfillmentActivationPatchRequest : Changes the fulfillment to status AVAILABLE. In the case of multi-journey  product, one of the fulfillment is now 'activated' and can be used to travel. Selects on-demand vehicles. Selects pick-up place and vehicle type for continuous services. 
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct FulfillmentActivationPatchRequest {
17    #[serde(rename = "selectedZoneIds", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
18    pub selected_zone_ids: Option<Option<Vec<String>>>,
19    #[serde(rename = "travelDates", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
20    pub travel_dates: Option<Option<Vec<String>>>,
21    #[serde(rename = "startOfUsage", deserialize_with = "Option::deserialize")]
22    pub start_of_usage: Option<String>,
23    #[serde(rename = "fromPlace", skip_serializing_if = "Option::is_none")]
24    pub from_place: Option<Box<models::PlaceRef>>,
25    /// The ids of the secure paper stock that identifies the blank secure paper stock used for printing.  The stock control number is only used for secure paper stock and triggers a printing of the stock control number in the ticket layout. This establishes a link between paper stock and ticket that is used to control the usage of blank secure paper stock at offices as secure paper has otherwise no intrinsic protection against internal fraud. 
26    #[serde(rename = "stockControlNumbers", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27    pub stock_control_numbers: Option<Option<Vec<String>>>,
28    #[serde(rename = "continuousServiceVehicleSelection", skip_serializing_if = "Option::is_none")]
29    pub continuous_service_vehicle_selection: Option<Box<models::ContinuousServiceVehicleSelection>>,
30}
31
32impl FulfillmentActivationPatchRequest {
33    /// Changes the fulfillment to status AVAILABLE. In the case of multi-journey  product, one of the fulfillment is now 'activated' and can be used to travel. Selects on-demand vehicles. Selects pick-up place and vehicle type for continuous services. 
34    pub fn new(start_of_usage: Option<String>) -> FulfillmentActivationPatchRequest {
35        FulfillmentActivationPatchRequest {
36            selected_zone_ids: None,
37            travel_dates: None,
38            start_of_usage,
39            from_place: None,
40            stock_control_numbers: None,
41            continuous_service_vehicle_selection: None,
42        }
43    }
44}
45