amazon_spapi/models/services/
create_reservation_record.rs

1/*
2 * Selling Partner API for Services
3 *
4 * With the Services API, you can build applications that help service providers get and modify their service orders and manage their resources.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// CreateReservationRecord : `CreateReservationRecord` entity contains the `Reservation` if there is an error/warning while performing the requested operation on it, otherwise it will contain the new `reservationId`.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CreateReservationRecord {
17    #[serde(rename = "reservation", skip_serializing_if = "Option::is_none")]
18    pub reservation: Option<Box<models::services::Reservation>>,
19    /// A list of warnings returned in the sucessful execution response of an API request.
20    #[serde(rename = "warnings", skip_serializing_if = "Option::is_none")]
21    pub warnings: Option<Vec<models::services::Warning>>,
22    /// A list of error responses returned when a request is unsuccessful.
23    #[serde(rename = "errors", skip_serializing_if = "Option::is_none")]
24    pub errors: Option<Vec<models::services::Error>>,
25}
26
27impl CreateReservationRecord {
28    /// `CreateReservationRecord` entity contains the `Reservation` if there is an error/warning while performing the requested operation on it, otherwise it will contain the new `reservationId`.
29    pub fn new() -> CreateReservationRecord {
30        CreateReservationRecord {
31            reservation: None,
32            warnings: None,
33            errors: None,
34        }
35    }
36}
37