amazon_spapi/models/services/
availability_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/// AvailabilityRecord : `AvailabilityRecord` to represent the capacity of a resource over a time range.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct AvailabilityRecord {
17    /// Denotes the time from when the resource is available in a day in ISO-8601 format.
18    #[serde(rename = "startTime")]
19    pub start_time: String,
20    /// Denotes the time till when the resource is available in a day in ISO-8601 format.
21    #[serde(rename = "endTime")]
22    pub end_time: String,
23    #[serde(rename = "recurrence", skip_serializing_if = "Option::is_none")]
24    pub recurrence: Option<Box<models::services::Recurrence>>,
25    /// Signifies the capacity of a resource which is available.
26    #[serde(rename = "capacity", skip_serializing_if = "Option::is_none")]
27    pub capacity: Option<i32>,
28}
29
30impl AvailabilityRecord {
31    /// `AvailabilityRecord` to represent the capacity of a resource over a time range.
32    pub fn new(start_time: String, end_time: String) -> AvailabilityRecord {
33        AvailabilityRecord {
34            start_time,
35            end_time,
36            recurrence: None,
37            capacity: None,
38        }
39    }
40}
41