/*
* 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.565.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 UpdateCalendarEventRequest {
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
/// HTML.
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "location", skip_serializing_if = "Option::is_none")]
pub location: Option<String>,
/// ISO date-time, or a date (`YYYY-MM-DD`) for all-day events.
#[serde(rename = "start", skip_serializing_if = "Option::is_none")]
pub start: Option<String>,
/// Exclusive for all-day events.
#[serde(rename = "end", skip_serializing_if = "Option::is_none")]
pub end: Option<String>,
#[serde(rename = "allDay", skip_serializing_if = "Option::is_none")]
pub all_day: Option<bool>,
/// IANA zone the event is scheduled in. Defaults to the calendar's zone on Google and the mailbox's working-hours zone on Microsoft (UTC when Outlook has none, as on personal accounts). A PATCH that moves an event without a zone keeps the zone the event already has.
#[serde(rename = "timezone", skip_serializing_if = "Option::is_none")]
pub timezone: Option<String>,
#[serde(rename = "participants", skip_serializing_if = "Option::is_none")]
pub participants: Option<Vec<models::CalendarEventFieldsParticipantsInner>>,
/// RRULE lines, e.g. `RRULE:FREQ=WEEKLY;BYDAY=MO,WE;COUNT=10`. Microsoft takes one RRULE plus EXDATE lines; Zernio removes the EXDATE occurrences after saving the series.
#[serde(rename = "recurrence", skip_serializing_if = "Option::is_none")]
pub recurrence: Option<Vec<String>>,
#[serde(rename = "reminders", skip_serializing_if = "Option::is_none")]
pub reminders: Option<Box<models::CalendarEventFieldsReminders>>,
#[serde(rename = "conferencing", skip_serializing_if = "Option::is_none")]
pub conferencing: Option<Conferencing>,
#[serde(rename = "busy", skip_serializing_if = "Option::is_none")]
pub busy: Option<bool>,
#[serde(rename = "visibility", skip_serializing_if = "Option::is_none")]
pub visibility: Option<Visibility>,
/// String pairs stored on the event and returned on reads, on Google and Microsoft.
#[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
pub metadata: Option<std::collections::HashMap<String, String>>,
/// Who gets an invitation or update email for this write: everyone, only guests outside the organizer's domain, or nobody. Google only; Outlook always notifies, so `external` and `none` answer 400 `unsupported_for_provider` on a Microsoft account.
#[serde(rename = "notifyParticipants", skip_serializing_if = "Option::is_none")]
pub notify_participants: Option<NotifyParticipants>,
#[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>,
}
impl UpdateCalendarEventRequest {
pub fn new(account_id: String) -> UpdateCalendarEventRequest {
UpdateCalendarEventRequest {
title: None,
description: None,
location: None,
start: None,
end: None,
all_day: None,
timezone: None,
participants: None,
recurrence: None,
reminders: None,
conferencing: None,
busy: None,
visibility: None,
metadata: None,
notify_participants: None,
account_id,
calendar_id: None,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Conferencing {
#[serde(rename = "google_meet")]
GoogleMeet,
#[serde(rename = "teams")]
Teams,
}
impl Default for Conferencing {
fn default() -> Conferencing {
Self::GoogleMeet
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Visibility {
#[serde(rename = "default")]
Default,
#[serde(rename = "public")]
Public,
#[serde(rename = "private")]
Private,
}
impl Default for Visibility {
fn default() -> Visibility {
Self::Default
}
}
/// Who gets an invitation or update email for this write: everyone, only guests outside the organizer's domain, or nobody. Google only; Outlook always notifies, so `external` and `none` answer 400 `unsupported_for_provider` on a Microsoft account.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum NotifyParticipants {
#[serde(rename = "all")]
All,
#[serde(rename = "external")]
External,
#[serde(rename = "none")]
None,
}
impl Default for NotifyParticipants {
fn default() -> NotifyParticipants {
Self::All
}
}