amazon_spapi/models/services/
recurrence.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/// Recurrence : Repeated occurrence of an event in a time range.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Recurrence {
17    /// End time of the recurrence.
18    #[serde(rename = "endTime")]
19    pub end_time: String,
20    /// Days of the week when recurrence is valid. If the schedule is valid every Monday, input will only contain `MONDAY` in the list.
21    #[serde(rename = "daysOfWeek", skip_serializing_if = "Option::is_none")]
22    pub days_of_week: Option<Vec<models::services::DayOfWeek>>,
23    /// Days of the month when recurrence is valid.
24    #[serde(rename = "daysOfMonth", skip_serializing_if = "Option::is_none")]
25    pub days_of_month: Option<Vec<i32>>,
26}
27
28impl Recurrence {
29    /// Repeated occurrence of an event in a time range.
30    pub fn new(end_time: String) -> Recurrence {
31        Recurrence {
32            end_time,
33            days_of_week: None,
34            days_of_month: None,
35        }
36    }
37}
38