amazon_spapi/models/services/fixed_slot_capacity_query.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/// FixedSlotCapacityQuery : Request schema for the `getFixedSlotCapacity` operation. This schema is used to define the time range, capacity types and slot duration which are being queried.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct FixedSlotCapacityQuery {
17 /// An array of capacity types which are being requested. Default value is `[SCHEDULED_CAPACITY]`.
18 #[serde(rename = "capacityTypes", skip_serializing_if = "Option::is_none")]
19 pub capacity_types: Option<Vec<models::services::CapacityType>>,
20 /// Size in which slots are being requested. This value should be a multiple of 5 and fall in the range: 5 <= `slotDuration` <= 360.
21 #[serde(rename = "slotDuration", skip_serializing_if = "Option::is_none")]
22 pub slot_duration: Option<f64>,
23 /// Start date time from which the capacity slots are being requested in ISO 8601 format.
24 #[serde(rename = "startDateTime")]
25 pub start_date_time: String,
26 /// End date time up to which the capacity slots are being requested in ISO 8601 format.
27 #[serde(rename = "endDateTime")]
28 pub end_date_time: String,
29}
30
31impl FixedSlotCapacityQuery {
32 /// Request schema for the `getFixedSlotCapacity` operation. This schema is used to define the time range, capacity types and slot duration which are being queried.
33 pub fn new(start_date_time: String, end_date_time: String) -> FixedSlotCapacityQuery {
34 FixedSlotCapacityQuery {
35 capacity_types: None,
36 slot_duration: None,
37 start_date_time,
38 end_date_time,
39 }
40 }
41}
42