You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
ReactOrganizer/model/Lesson.js

127 lines
3.1 KiB

/**
* Organizer
* Dies ist eine API, die es ermöglicht Daten zu Stunden-, Vertretungs-, oder Klausurplänen zu erhalten.
*
* OpenAPI spec version: 1.0.0
* Contact: info@jonasfranz.software
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import Subject from './Subject';
import Teacher from './Teacher';
/**
* The Lesson model module.
* @module model/Lesson
* @version 1.0.0
*/
export default class Lesson {
/**
* Constructs a new <code>Lesson</code>.
* @alias module:model/Lesson
* @class
*/
constructor() {
}
/**
* Constructs a <code>Lesson</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/Lesson} obj Optional instance to populate.
* @return {module:model/Lesson} The populated <code>Lesson</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new Lesson();
if (data.hasOwnProperty('weekday')) {
obj['weekday'] = ApiClient.convertToType(data['weekday'], 'Number');
}
if (data.hasOwnProperty('period')) {
obj['period'] = ApiClient.convertToType(data['period'], 'Number');
}
if (data.hasOwnProperty('course')) {
obj['course'] = ApiClient.convertToType(data['course'], 'String');
}
if (data.hasOwnProperty('subject')) {
obj['subject'] = Subject.constructFromObject(data['subject']);
}
if (data.hasOwnProperty('teacher')) {
obj['teacher'] = Teacher.constructFromObject(data['teacher']);
}
if (data.hasOwnProperty('additionalInformation')) {
obj['additionalInformation'] = ApiClient.convertToType(data['additionalInformation'], 'String');
}
if (data.hasOwnProperty('room')) {
obj['room'] = ApiClient.convertToType(data['room'], 'String');
}
}
return obj;
}
/**
* @member {Number} weekday
*/
weekday = undefined;
/**
* The period of the day where the lesson is
* @member {Number} period
*/
period = undefined;
/**
* Class or Course
* @member {String} course
*/
course = undefined;
/**
* @member {module:model/Subject} subject
*/
subject = undefined;
/**
* @member {module:model/Teacher} teacher
*/
teacher = undefined;
/**
* An additional information like 'Every 14 days only'
* @member {String} additionalInformation
*/
additionalInformation = undefined;
/**
* @member {String} room
*/
room = undefined;
}