pub struct Event {Show 26 fields
pub id: EventId,
pub grant_id: GrantId,
pub calendar_id: CalendarId,
pub title: Option<String>,
pub description: Option<String>,
pub when: When,
pub location: Option<String>,
pub busy: bool,
pub status: EventStatus,
pub participants: Vec<Participant>,
pub organizer: Option<EmailAddress>,
pub creator: Option<EmailAddress>,
pub conferencing: Option<Conferencing>,
pub recurrence: Option<Recurrence>,
pub reminders: Option<Reminders>,
pub capacity: Option<i32>,
pub hide_participants: bool,
pub read_only: bool,
pub html_link: Option<String>,
pub ical_uid: Option<String>,
pub resources: Vec<Resource>,
pub visibility: Option<EventVisibility>,
pub object: String,
pub metadata: Option<Value>,
pub created_at: Option<i64>,
pub updated_at: Option<i64>,
}Expand description
An event object from the Nylas API.
Events represent calendar events from various providers (Google, Microsoft, etc.).
§Example
let event = Event {
id: EventId::new("event_123"),
grant_id: GrantId::new("grant_123"),
calendar_id: CalendarId::new("cal_123"),
title: Some("Team Meeting".to_string()),
description: Some("Weekly team sync".to_string()),
when: When::Timespan {
start_time: 1234567890,
end_time: 1234571490,
start_timezone: Some("America/New_York".to_string()),
end_timezone: Some("America/New_York".to_string()),
},
location: Some("Conference Room A".to_string()),
busy: true,
status: EventStatus::Confirmed,
participants: vec![],
organizer: None,
creator: None,
conferencing: None,
recurrence: None,
reminders: None,
capacity: None,
hide_participants: false,
read_only: false,
html_link: None,
ical_uid: None,
resources: vec![],
visibility: None,
object: "event".to_string(),
metadata: None,
created_at: Some(1234567890),
updated_at: Some(1234567890),
};Fields§
§id: EventIdUnique identifier for the event.
grant_id: GrantIdGrant ID associated with this event.
calendar_id: CalendarIdCalendar ID this event belongs to.
title: Option<String>Title of the event.
description: Option<String>Description of the event.
when: WhenWhen the event occurs.
location: Option<String>Location of the event.
busy: boolWhether the event shows as busy.
status: EventStatusStatus of the event.
participants: Vec<Participant>List of participants.
organizer: Option<EmailAddress>Organizer of the event.
creator: Option<EmailAddress>Creator of the event.
conferencing: Option<Conferencing>Conference details.
recurrence: Option<Recurrence>Recurrence rules for repeating events.
reminders: Option<Reminders>Reminder settings.
capacity: Option<i32>Maximum capacity for the event.
hide_participants: boolWhether to hide participants from each other.
read_only: boolWhether the event is read-only.
html_link: Option<String>Link to view the event in the provider’s interface.
ical_uid: Option<String>iCalendar UID for the event.
resources: Vec<Resource>Resources (rooms, equipment) booked for the event.
visibility: Option<EventVisibility>Visibility of the event (default, public, private).
object: StringObject type identifier (always “event”).
metadata: Option<Value>Optional metadata for the event.
created_at: Option<i64>Unix timestamp when the event was created.
updated_at: Option<i64>Unix timestamp when the event was last updated.