@pinecone-database/pinecone
Version:
This is the official Node.js SDK for [Pinecone](https://www.pinecone.io), written in TypeScript.
78 lines • 3.27 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
/**
* Pinecone Assistant Data Plane API
* Pinecone Assistant Engine is a context engine to store and retrieve relevant knowledge from millions of documents at scale. This API supports interactions with assistants.
*
* The version of the OpenAPI document: 2025-04
* Contact: support@pinecone.io
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.AssistantFileModelToJSON = exports.AssistantFileModelFromJSONTyped = exports.AssistantFileModelFromJSON = exports.instanceOfAssistantFileModel = exports.AssistantFileModelStatusEnum = void 0;
const runtime_1 = require("../runtime");
/**
* @export
*/
exports.AssistantFileModelStatusEnum = {
Processing: 'Processing',
Available: 'Available',
Deleting: 'Deleting',
ProcessingFailed: 'ProcessingFailed'
};
/**
* Check if a given object implements the AssistantFileModel interface.
*/
function instanceOfAssistantFileModel(value) {
let isInstance = true;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "id" in value;
return isInstance;
}
exports.instanceOfAssistantFileModel = instanceOfAssistantFileModel;
function AssistantFileModelFromJSON(json) {
return AssistantFileModelFromJSONTyped(json, false);
}
exports.AssistantFileModelFromJSON = AssistantFileModelFromJSON;
function AssistantFileModelFromJSONTyped(json, ignoreDiscriminator) {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'name': json['name'],
'id': json['id'],
'metadata': !(0, runtime_1.exists)(json, 'metadata') ? undefined : json['metadata'],
'createdOn': !(0, runtime_1.exists)(json, 'created_on') ? undefined : (new Date(json['created_on'])),
'updatedOn': !(0, runtime_1.exists)(json, 'updated_on') ? undefined : (new Date(json['updated_on'])),
'status': !(0, runtime_1.exists)(json, 'status') ? undefined : json['status'],
'percentDone': !(0, runtime_1.exists)(json, 'percent_done') ? undefined : json['percent_done'],
'signedUrl': !(0, runtime_1.exists)(json, 'signed_url') ? undefined : json['signed_url'],
'errorMessage': !(0, runtime_1.exists)(json, 'error_message') ? undefined : json['error_message'],
};
}
exports.AssistantFileModelFromJSONTyped = AssistantFileModelFromJSONTyped;
function AssistantFileModelToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'name': value.name,
'id': value.id,
'metadata': value.metadata,
'created_on': value.createdOn === undefined ? undefined : (value.createdOn.toISOString()),
'updated_on': value.updatedOn === undefined ? undefined : (value.updatedOn.toISOString()),
'status': value.status,
'percent_done': value.percentDone,
'signed_url': value.signedUrl,
'error_message': value.errorMessage,
};
}
exports.AssistantFileModelToJSON = AssistantFileModelToJSON;
//# sourceMappingURL=AssistantFileModel.js.map
;