Struct zermelo::Appointment
[−]
[src]
pub struct Appointment { pub appointment_instance: Option<i64>, pub id: Option<i64>, pub start: Option<i64>, pub end: Option<i64>, pub start_time_slot: Option<i64>, pub end_time_slot: Option<i64>, pub subjects: Option<Vec<String>>, pub appointment_type: Option<String>, pub remark: Option<String>, pub locations: Option<Vec<String>>, pub teachers: Option<Vec<String>>, pub groups: Option<Vec<String>>, pub created: Option<i64>, pub last_modified: Option<i64>, pub valid: Option<bool>, pub hidden: Option<bool>, pub cancelled: Option<bool>, pub modified: Option<bool>, pub moved: Option<bool>, pub new: Option<bool>, pub change_description: Option<String>, pub branch_of_school: Option<i64>, pub branch: Option<String>, }
This struct represents an appointment in the schedule. It should (more or less) match Zermelo's appointment specification.
This struct does not have an implementation with methods like Appointment::new()
, because is
is deserialised by serde.
Note: instead of camelCase, as used by Zermelo in their JSON, this struct uses snake_case
, as common in Rust programs.
Example: startTimeSlot
becomes start_time_slot
.
Note: appointment_type
is called type
in Zermelo's API, but type
is a reserved keyword in Rust.
See Zermelo's appointment documentation for a full explanation of this struct's members.
On this page a part of Zermelo's explanation can be found.
Fields
appointment_instance: Option<i64>
The id of the appointment instance this appointment version belongs to.
id: Option<i64>
The internal id of this version of the appointment.
start: Option<i64>
UTC Unix time of the start of this appointment (the number of seconds elapsed since 1 January 1970).
end: Option<i64>
UTC Unix time of the end of this appointment (the number of seconds elapsed since 1 January 1970).
start_time_slot: Option<i64>
The numerical designation of the time slot during which this appointment starts. Usual values are between 1 and 9.
end_time_slot: Option<i64>
The numerical designation of the time slot during which this appointment ends. Usual values are between 1 and 9.
subjects: Option<Vec<String>>
The (human readable) subjects names or abbreviations this appointment is about.
appointment_type: Option<String>
The type of this appointment. See AppointmentType for more information.
Note: this member is called type
in Zermelo's API, but type
is a reserved keyword in Rust.
remark: Option<String>
Remark for this appointment. For example: "Don't forget your books".
locations: Option<Vec<String>>
The names of the locations (classrooms) where this appointment will take place.
teachers: Option<Vec<String>>
The (three letter) codes/abbreviations of the teachers participating in this appointment.
groups: Option<Vec<String>>
The names of the student groups participating in this appointment.
created: Option<i64>
The UTC Unix Time of when this appointment version was created. Useful to show a chronological view of the history of this appointment.
last_modified: Option<i64>
Unix time (UTC) at which any fields of this version of the appointment were modified or when this version of the appointment was created.
valid: Option<bool>
True if this appointment is part of the most up-to-date schedule.
True if this version of the appointment was hidden and should not be shown to users.
cancelled: Option<bool>
True if this appointment has been cancelled.
modified: Option<bool>
True if anything at all was changed in this version of the appointment.
moved: Option<bool>
True if the start or end time or the location of this appointment were modified.
new: Option<bool>
True if this appointment has been added and was not originally scheduled.
change_description: Option<String>
A textual description of the change to be shown to the user.
branch_of_school: Option<i64>
Internal ID of the branch of the schoolInSchoolyear (Dutch: vestiging van school in schooljaar) this appointment belongs to.
branch: Option<String>
Convenience field providing the branch code of the branchOfSchool.