/* tslint:disable */
/* eslint-disable */
/**
* Squad API
* API for managing Squad resources
*
* The version of the OpenAPI document: 0.14.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Knowledge base document data
* @export
* @interface KnowledgeBaseDocument
*/
export interface KnowledgeBaseDocument {
/**
* Name of the document file
* @type {string}
* @memberof KnowledgeBaseDocument
*/
fileName: string;
/**
* Size of the document in bytes
* @type {number}
* @memberof KnowledgeBaseDocument
*/
fileSize: number;
/**
* MIME type of the document
* @type {string}
* @memberof KnowledgeBaseDocument
*/
mimeType: string;
/**
* Date and time when the document was uploaded
* @type {string}
* @memberof KnowledgeBaseDocument
*/
uploadDate: string;
/**
* Processing status of the document
* @type {string}
* @memberof KnowledgeBaseDocument
*/
status: KnowledgeBaseDocumentStatusEnum;
/**
* URL to access the document if available
* @type {string}
* @memberof KnowledgeBaseDocument
*/
url?: string;
}
/**
* @export
*/
export const KnowledgeBaseDocumentStatusEnum = {
Processing: "processing",
Ready: "ready",
Error: "error",
} as const;
export type KnowledgeBaseDocumentStatusEnum =
(typeof KnowledgeBaseDocumentStatusEnum)[keyof typeof KnowledgeBaseDocumentStatusEnum];
/**
* Check if a given object implements the KnowledgeBaseDocument interface.
*/
export function instanceOfKnowledgeBaseDocument(
value: object,
): value is KnowledgeBaseDocument {
if (!("fileName" in value) || value["fileName"] === undefined) return false;
if (!("fileSize" in value) || value["fileSize"] === undefined) return false;
if (!("mimeType" in value) || value["mimeType"] === undefined) return false;
if (!("uploadDate" in value) || value["uploadDate"] === undefined)
return false;
if (!("status" in value) || value["status"] === undefined) return false;
return true;
}
export function KnowledgeBaseDocumentFromJSON(
json: any,
): KnowledgeBaseDocument {
return KnowledgeBaseDocumentFromJSONTyped(json, false);
}
export function KnowledgeBaseDocumentFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): KnowledgeBaseDocument {
if (json == null) {
return json;
}
return {
fileName: json["fileName"],
fileSize: json["fileSize"],
mimeType: json["mimeType"],
uploadDate: json["uploadDate"],
status: json["status"],
url: json["url"] == null ? undefined : json["url"],
};
}
export function KnowledgeBaseDocumentToJSON(json: any): KnowledgeBaseDocument {
return KnowledgeBaseDocumentToJSONTyped(json, false);
}
export function KnowledgeBaseDocumentToJSONTyped(
value?: KnowledgeBaseDocument | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
fileName: value["fileName"],
fileSize: value["fileSize"],
mimeType: value["mimeType"],
uploadDate: value["uploadDate"],
status: value["status"],
url: value["url"],
};
}