osdm_sys/models/
continuous_service_usage_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
14use serde_with::serde_as;
15
16/// ContinuousServiceUsagePatchRequest : Usage of a continuos service vehicle
17#[serde_as]
18#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
19pub struct ContinuousServiceUsagePatchRequest {
20    #[serde(rename = "id")]
21    pub id: String,
22    /// status of the usage of a vehicle
23    #[serde(rename = "status")]
24    pub status: String,
25    /// base64 encoded binary of the jpg image of the parked vehicle when ending the usage. 
26    #[serde_as(as = "Option<serde_with::base64::Base64>")]
27    #[serde(rename = "parkingImage", skip_serializing_if = "Option::is_none")]
28    pub parking_image: Option<Vec<u8>>,
29    #[serde(rename = "tip", skip_serializing_if = "Option::is_none")]
30    pub tip: Option<Box<models::Tip>>,
31}
32
33impl ContinuousServiceUsagePatchRequest {
34    /// Usage of a continuos service vehicle
35    pub fn new(id: String, status: String) -> ContinuousServiceUsagePatchRequest {
36        ContinuousServiceUsagePatchRequest {
37            id,
38            status,
39            parking_image: None,
40            tip: None,
41        }
42    }
43}
44