/*
* Zernio API
*
* API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
*
* The version of the OpenAPI document: 1.563.0
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RsvpCalendarEventRequest {
#[serde(rename = "accountId")]
pub account_id: String,
/// The calendar holding the event (an id from GET /v1/calendar/calendars). Defaults to the primary calendar.
#[serde(rename = "calendarId", skip_serializing_if = "Option::is_none")]
pub calendar_id: Option<String>,
#[serde(rename = "status")]
pub status: Status,
#[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
pub comment: Option<String>,
/// false records the response without emailing the organizer.
#[serde(rename = "sendResponse", skip_serializing_if = "Option::is_none")]
pub send_response: Option<bool>,
}
impl RsvpCalendarEventRequest {
pub fn new(account_id: String, status: Status) -> RsvpCalendarEventRequest {
RsvpCalendarEventRequest {
account_id,
calendar_id: None,
status,
comment: None,
send_response: None,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
#[serde(rename = "accepted")]
Accepted,
#[serde(rename = "declined")]
Declined,
#[serde(rename = "tentative")]
Tentative,
}
impl Default for Status {
fn default() -> Status {
Self::Accepted
}
}