104 lines
2.7 KiB
TypeScript
104 lines
2.7 KiB
TypeScript
|
/* tslint:disable */
|
||
|
/* eslint-disable */
|
||
|
/**
|
||
|
* Jellyfin API
|
||
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||
|
*
|
||
|
* The version of the OpenAPI document: 10.8.9
|
||
|
*
|
||
|
*
|
||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||
|
* https://openapi-generator.tech
|
||
|
* Do not edit the class manually.
|
||
|
*/
|
||
|
|
||
|
import { exists, mapValues } from '../runtime';
|
||
|
import type { DynamicDayOfWeek } from './DynamicDayOfWeek';
|
||
|
import {
|
||
|
DynamicDayOfWeekFromJSON,
|
||
|
DynamicDayOfWeekFromJSONTyped,
|
||
|
DynamicDayOfWeekToJSON,
|
||
|
} from './DynamicDayOfWeek';
|
||
|
|
||
|
/**
|
||
|
* An entity representing a user's access schedule.
|
||
|
* @export
|
||
|
* @interface AccessSchedule
|
||
|
*/
|
||
|
export interface AccessSchedule {
|
||
|
/**
|
||
|
* Gets the id of this instance.
|
||
|
* @type {number}
|
||
|
* @memberof AccessSchedule
|
||
|
*/
|
||
|
readonly id?: number;
|
||
|
/**
|
||
|
* Gets the id of the associated user.
|
||
|
* @type {string}
|
||
|
* @memberof AccessSchedule
|
||
|
*/
|
||
|
userId?: string;
|
||
|
/**
|
||
|
*
|
||
|
* @type {DynamicDayOfWeek}
|
||
|
* @memberof AccessSchedule
|
||
|
*/
|
||
|
dayOfWeek?: DynamicDayOfWeek;
|
||
|
/**
|
||
|
* Gets or sets the start hour.
|
||
|
* @type {number}
|
||
|
* @memberof AccessSchedule
|
||
|
*/
|
||
|
startHour?: number;
|
||
|
/**
|
||
|
* Gets or sets the end hour.
|
||
|
* @type {number}
|
||
|
* @memberof AccessSchedule
|
||
|
*/
|
||
|
endHour?: number;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Check if a given object implements the AccessSchedule interface.
|
||
|
*/
|
||
|
export function instanceOfAccessSchedule(value: object): boolean {
|
||
|
let isInstance = true;
|
||
|
|
||
|
return isInstance;
|
||
|
}
|
||
|
|
||
|
export function AccessScheduleFromJSON(json: any): AccessSchedule {
|
||
|
return AccessScheduleFromJSONTyped(json, false);
|
||
|
}
|
||
|
|
||
|
export function AccessScheduleFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccessSchedule {
|
||
|
if ((json === undefined) || (json === null)) {
|
||
|
return json;
|
||
|
}
|
||
|
return {
|
||
|
|
||
|
'id': !exists(json, 'Id') ? undefined : json['Id'],
|
||
|
'userId': !exists(json, 'UserId') ? undefined : json['UserId'],
|
||
|
'dayOfWeek': !exists(json, 'DayOfWeek') ? undefined : DynamicDayOfWeekFromJSON(json['DayOfWeek']),
|
||
|
'startHour': !exists(json, 'StartHour') ? undefined : json['StartHour'],
|
||
|
'endHour': !exists(json, 'EndHour') ? undefined : json['EndHour'],
|
||
|
};
|
||
|
}
|
||
|
|
||
|
export function AccessScheduleToJSON(value?: AccessSchedule | null): any {
|
||
|
if (value === undefined) {
|
||
|
return undefined;
|
||
|
}
|
||
|
if (value === null) {
|
||
|
return null;
|
||
|
}
|
||
|
return {
|
||
|
|
||
|
'UserId': value.userId,
|
||
|
'DayOfWeek': DynamicDayOfWeekToJSON(value.dayOfWeek),
|
||
|
'StartHour': value.startHour,
|
||
|
'EndHour': value.endHour,
|
||
|
};
|
||
|
}
|
||
|
|