jellyfin-discord-bot/server/jellyfin/models/GroupInfoDto.ts

105 lines
2.8 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 { GroupStateType } from './GroupStateType';
import {
GroupStateTypeFromJSON,
GroupStateTypeFromJSONTyped,
GroupStateTypeToJSON,
} from './GroupStateType';
/**
* Class GroupInfoDto.
* @export
* @interface GroupInfoDto
*/
export interface GroupInfoDto {
/**
* Gets the group identifier.
* @type {string}
* @memberof GroupInfoDto
*/
groupId?: string;
/**
* Gets the group name.
* @type {string}
* @memberof GroupInfoDto
*/
groupName?: string;
/**
*
* @type {GroupStateType}
* @memberof GroupInfoDto
*/
state?: GroupStateType;
/**
* Gets the participants.
* @type {Array<string>}
* @memberof GroupInfoDto
*/
participants?: Array<string>;
/**
* Gets the date when this DTO has been created.
* @type {Date}
* @memberof GroupInfoDto
*/
lastUpdatedAt?: Date;
}
/**
* Check if a given object implements the GroupInfoDto interface.
*/
export function instanceOfGroupInfoDto(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function GroupInfoDtoFromJSON(json: any): GroupInfoDto {
return GroupInfoDtoFromJSONTyped(json, false);
}
export function GroupInfoDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupInfoDto {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'groupId': !exists(json, 'GroupId') ? undefined : json['GroupId'],
'groupName': !exists(json, 'GroupName') ? undefined : json['GroupName'],
'state': !exists(json, 'State') ? undefined : GroupStateTypeFromJSON(json['State']),
'participants': !exists(json, 'Participants') ? undefined : json['Participants'],
'lastUpdatedAt': !exists(json, 'LastUpdatedAt') ? undefined : (new Date(json['LastUpdatedAt'])),
};
}
export function GroupInfoDtoToJSON(value?: GroupInfoDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'GroupId': value.groupId,
'GroupName': value.groupName,
'State': GroupStateTypeToJSON(value.state),
'Participants': value.participants,
'LastUpdatedAt': value.lastUpdatedAt === undefined ? undefined : (value.lastUpdatedAt.toISOString()),
};
}