pub struct MsgraphEvent {Show 33 fields
pub id: String,
pub ical_uid: Option<String>,
pub change_key: Option<String>,
pub created_date_time: Option<String>,
pub last_modified_date_time: Option<String>,
pub event_type: Option<MsgraphEventType>,
pub series_master_id: Option<String>,
pub original_start: Option<String>,
pub original_start_time_zone: Option<String>,
pub original_end_time_zone: Option<String>,
pub subject: MsgraphField<String>,
pub body: MsgraphField<MsgraphItemBody>,
pub start: MsgraphField<MsgraphDateTimeTimeZone>,
pub end: MsgraphField<MsgraphDateTimeTimeZone>,
pub is_all_day: MsgraphField<bool>,
pub location: MsgraphField<MsgraphLocation>,
pub recurrence: MsgraphField<MsgraphPatternedRecurrence>,
pub attendees: MsgraphField<Vec<MsgraphAttendee>>,
pub organizer: MsgraphField<MsgraphRecipient>,
pub categories: MsgraphField<Vec<String>>,
pub show_as: MsgraphField<MsgraphFreeBusyStatus>,
pub sensitivity: MsgraphField<MsgraphSensitivity>,
pub importance: MsgraphField<MsgraphImportance>,
pub is_reminder_on: MsgraphField<bool>,
pub reminder_minutes_before_start: MsgraphField<u32>,
pub is_cancelled: Option<bool>,
pub is_organizer: Option<bool>,
pub response_status: Option<MsgraphResponseStatus>,
pub web_link: Option<String>,
pub is_online_meeting: MsgraphField<bool>,
pub online_meeting: Option<MsgraphOnlineMeetingInfo>,
pub cancelled_occurrences: Vec<String>,
pub single_value_extended_properties: MsgraphField<Vec<MsgraphSingleValueExtendedProperty>>,
}Expand description
An event of a calendar. Doubles as the create/update body.
Unset fields are left out (an update preserves them), null fields are serialized as explicit nulls (an update clears them), and a set empty collection clears the collection.
Fields§
§id: StringThe unique identifier of the event.
ical_uid: Option<String>The iCalendar UID shared by every event of a series across calendars, read-only.
change_key: Option<String>The version of the event, changing with every edit, read-only.
created_date_time: Option<String>When the event was created, read-only.
last_modified_date_time: Option<String>When the event was last modified, read-only.
event_type: Option<MsgraphEventType>The kind of event: lone, series master, occurrence or exception, read-only.
series_master_id: Option<String>The series master of an occurrence or exception, read-only.
original_start: Option<String>The start the occurrence had in its series, for an occurrence or an exception, read-only.
original_start_time_zone: Option<String>The zone the event’s start was created in, read-only.
original_end_time_zone: Option<String>The zone the event’s end was created in, read-only.
subject: MsgraphField<String>The subject.
body: MsgraphField<MsgraphItemBody>The body.
start: MsgraphField<MsgraphDateTimeTimeZone>The start, a wall time in a zone.
end: MsgraphField<MsgraphDateTimeTimeZone>The end, a wall time in a zone.
is_all_day: MsgraphField<bool>Whether the event lasts whole days, its start and end then being midnights.
location: MsgraphField<MsgraphLocation>The location.
recurrence: MsgraphField<MsgraphPatternedRecurrence>The recurrence of a series master.
attendees: MsgraphField<Vec<MsgraphAttendee>>The attendees.
organizer: MsgraphField<MsgraphRecipient>The organizer, read-only once the event exists.
categories: MsgraphField<Vec<String>>The categories.
show_as: MsgraphField<MsgraphFreeBusyStatus>How the event shows in the user’s free/busy time.
sensitivity: MsgraphField<MsgraphSensitivity>The sensitivity.
importance: MsgraphField<MsgraphImportance>The importance.
is_reminder_on: MsgraphField<bool>Whether a reminder is set.
reminder_minutes_before_start: MsgraphField<u32>How long before the start the reminder fires, in minutes.
is_cancelled: Option<bool>Whether the event was cancelled, read-only.
is_organizer: Option<bool>Whether the user organizes the event, read-only.
response_status: Option<MsgraphResponseStatus>The user’s own response, read-only.
web_link: Option<String>The Outlook web link, read-only.
is_online_meeting: MsgraphField<bool>Whether the event is an online meeting. Setting it makes Graph
create one with the calendar’s default provider (Teams), whose
details then come back in onlineMeeting.
online_meeting: Option<MsgraphOnlineMeetingInfo>The details to join an online meeting (Teams), read-only.
cancelled_occurrences: Vec<String>The occurrence ids (OID.{seriesMasterId}.{date}) of a series’
cancelled occurrences, on a series master, read-only.
single_value_extended_properties: MsgraphField<Vec<MsgraphSingleValueExtendedProperty>>Single-value extended properties, returned only when expanded.
Implementations§
Source§impl MsgraphEvent
impl MsgraphEvent
Sourcepub fn to_ical(&self) -> String
Available on crate feature ical only.
pub fn to_ical(&self) -> String
ical only.Projects a lone event or a series master onto a fresh VCALENDAR document.
Sourcepub fn to_ical_series(&self, exceptions: &[&MsgraphEvent]) -> String
Available on crate feature ical only.
pub fn to_ical_series(&self, exceptions: &[&MsgraphEvent]) -> String
ical only.Projects a series master and its exceptions onto one VCALENDAR document, the exceptions as VEVENTs carrying the master’s UID and a RECURRENCE-ID.
Read the exceptions with MSGRAPH_EVENT_ICAL_SELECT too: the
default instance listing leaves out originalStart, without which
an exception gets no RECURRENCE-ID and reads as a second master.
Sourcepub fn from_ical(contents: &[u8]) -> Result<Self, MsgraphEventIcalError>
Available on crate feature ical only.
pub fn from_ical(contents: &[u8]) -> Result<Self, MsgraphEventIcalError>
ical only.Projects an iCalendar document onto an event, in full state: each managed field is Set from the series master or Null when absent, while Graph-only fields stay Unset.
The exceptions of a series are not read: Graph takes each through
its instance (Self::instance_update_from_ical).
Sourcepub fn create_from_ical(contents: &[u8]) -> Result<Self, MsgraphEventIcalError>
Available on crate feature ical only.
pub fn create_from_ical(contents: &[u8]) -> Result<Self, MsgraphEventIcalError>
ical only.Projects an iCalendar document onto a create body: the full-state projection minus its nulls and empty collections, which a fresh event does not need.
Sourcepub fn update_from_ical(
contents: &[u8],
base: &[u8],
) -> Result<Self, MsgraphEventIcalError>
Available on crate feature ical only.
pub fn update_from_ical( contents: &[u8], base: &[u8], ) -> Result<Self, MsgraphEventIcalError>
ical only.Projects an iCalendar document onto an update body: the fields that differ from the base document (the state last synced), the unchanged ones left Unset and out of the PATCH.
Sourcepub fn instance_update_from_ical(
contents: &[u8],
base: &[u8],
) -> Result<Option<Self>, MsgraphEventIcalError>
Available on crate feature ical only.
pub fn instance_update_from_ical( contents: &[u8], base: &[u8], ) -> Result<Option<Self>, MsgraphEventIcalError>
ical only.Projects one occurrence of a series onto the update body of its
Graph instance: the fields it sets differently from base, the
occurrence as Graph holds it; None when the two agree.
Each document holds that occurrence alone, as its first VEVENT: an override with its RECURRENCE-ID, or the series’ own component carried to the occurrence, which is what reverts an exception. Neither the recurrence nor the stash is sent, Graph keeping both on the series master.
Sourcepub fn recurrence_id_of(&self, original_start: &str) -> Option<String>
Available on crate feature ical only.
pub fn recurrence_id_of(&self, original_start: &str) -> Option<String>
ical only.The RECURRENCE-ID value the projection gives the occurrence of this
series master that originally started at original_start (an
instance’s originalStart): a date for an all-day series, the wall
time in the series’ zone, or a UTC stamp when that zone is unknown.
A consumer told an occurrence by its RECURRENCE-ID finds the Graph instance with it, comparing values the way the projection wrote them.
Sourcepub fn stashed_uid(&self) -> Option<String>
Available on crate feature ical only.
pub fn stashed_uid(&self) -> Option<String>
ical only.The iCalendar UID the stash carries, None for an event no document
was ever written to, Graph minting its own iCalUId.
A sync engine checks it after a write: a server that dropped the stash would hand the event back under Graph’s UID rather than the one it was written with.