Files
reflector/www/app/api/models/Word.ts
2023-12-07 17:05:07 +01:00

93 lines
1.7 KiB
TypeScript

/* tslint:disable */
/* eslint-disable */
/**
* FastAPI
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.1.0
*
*
* 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";
/**
*
* @export
* @interface Word
*/
export interface Word {
/**
*
* @type {any}
* @memberof Word
*/
text: any | null;
/**
*
* @type {any}
* @memberof Word
*/
start: any | null;
/**
*
* @type {any}
* @memberof Word
*/
end: any | null;
/**
*
* @type {any}
* @memberof Word
*/
speaker?: any | null;
}
/**
* Check if a given object implements the Word interface.
*/
export function instanceOfWord(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "text" in value;
isInstance = isInstance && "start" in value;
isInstance = isInstance && "end" in value;
return isInstance;
}
export function WordFromJSON(json: any): Word {
return WordFromJSONTyped(json, false);
}
export function WordFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): Word {
if (json === undefined || json === null) {
return json;
}
return {
text: json["text"],
start: json["start"],
end: json["end"],
speaker: !exists(json, "speaker") ? undefined : json["speaker"],
};
}
export function WordToJSON(value?: Word | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
text: value.text,
start: value.start,
end: value.end,
speaker: value.speaker,
};
}