UNPKG

@pinecone-database/pinecone

Version:

This is the official Node.js SDK for [Pinecone](https://www.pinecone.io), written in TypeScript.

93 lines 3.69 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * 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.BackupModelToJSON = exports.BackupModelFromJSONTyped = exports.BackupModelFromJSON = exports.instanceOfBackupModel = exports.BackupModelMetricEnum = void 0; const runtime_1 = require("../runtime"); /** * @export */ exports.BackupModelMetricEnum = { Cosine: 'cosine', Euclidean: 'euclidean', Dotproduct: 'dotproduct' }; /** * Check if a given object implements the BackupModel interface. */ function instanceOfBackupModel(value) { let isInstance = true; isInstance = isInstance && "backupId" in value; isInstance = isInstance && "sourceIndexName" in value; isInstance = isInstance && "sourceIndexId" in value; isInstance = isInstance && "status" in value; isInstance = isInstance && "cloud" in value; isInstance = isInstance && "region" in value; return isInstance; } exports.instanceOfBackupModel = instanceOfBackupModel; function BackupModelFromJSON(json) { return BackupModelFromJSONTyped(json, false); } exports.BackupModelFromJSON = BackupModelFromJSON; function BackupModelFromJSONTyped(json, ignoreDiscriminator) { if ((json === undefined) || (json === null)) { return json; } return { 'backupId': json['backup_id'], 'sourceIndexName': json['source_index_name'], 'sourceIndexId': json['source_index_id'], 'name': !(0, runtime_1.exists)(json, 'name') ? undefined : json['name'], 'description': !(0, runtime_1.exists)(json, 'description') ? undefined : json['description'], 'status': json['status'], 'cloud': json['cloud'], 'region': json['region'], 'dimension': !(0, runtime_1.exists)(json, 'dimension') ? undefined : json['dimension'], 'metric': !(0, runtime_1.exists)(json, 'metric') ? undefined : json['metric'], 'recordCount': !(0, runtime_1.exists)(json, 'record_count') ? undefined : json['record_count'], 'namespaceCount': !(0, runtime_1.exists)(json, 'namespace_count') ? undefined : json['namespace_count'], 'sizeBytes': !(0, runtime_1.exists)(json, 'size_bytes') ? undefined : json['size_bytes'], 'tags': !(0, runtime_1.exists)(json, 'tags') ? undefined : json['tags'], 'createdAt': !(0, runtime_1.exists)(json, 'created_at') ? undefined : json['created_at'], }; } exports.BackupModelFromJSONTyped = BackupModelFromJSONTyped; function BackupModelToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'backup_id': value.backupId, 'source_index_name': value.sourceIndexName, 'source_index_id': value.sourceIndexId, 'name': value.name, 'description': value.description, 'status': value.status, 'cloud': value.cloud, 'region': value.region, 'dimension': value.dimension, 'metric': value.metric, 'record_count': value.recordCount, 'namespace_count': value.namespaceCount, 'size_bytes': value.sizeBytes, 'tags': value.tags, 'created_at': value.createdAt, }; } exports.BackupModelToJSON = BackupModelToJSON; //# sourceMappingURL=BackupModel.js.map