@pinecone-database/pinecone
Version:
This is the official Node.js SDK for [Pinecone](https://www.pinecone.io), written in TypeScript.
75 lines • 3.14 kB
JavaScript
;
/* 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.CreateIndexForModelRequestToJSON = exports.CreateIndexForModelRequestFromJSONTyped = exports.CreateIndexForModelRequestFromJSON = exports.instanceOfCreateIndexForModelRequest = exports.CreateIndexForModelRequestCloudEnum = void 0;
const runtime_1 = require("../runtime");
const CreateIndexForModelRequestEmbed_1 = require("./CreateIndexForModelRequestEmbed");
const DeletionProtection_1 = require("./DeletionProtection");
/**
* @export
*/
exports.CreateIndexForModelRequestCloudEnum = {
Gcp: 'gcp',
Aws: 'aws',
Azure: 'azure'
};
/**
* Check if a given object implements the CreateIndexForModelRequest interface.
*/
function instanceOfCreateIndexForModelRequest(value) {
let isInstance = true;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "cloud" in value;
isInstance = isInstance && "region" in value;
isInstance = isInstance && "embed" in value;
return isInstance;
}
exports.instanceOfCreateIndexForModelRequest = instanceOfCreateIndexForModelRequest;
function CreateIndexForModelRequestFromJSON(json) {
return CreateIndexForModelRequestFromJSONTyped(json, false);
}
exports.CreateIndexForModelRequestFromJSON = CreateIndexForModelRequestFromJSON;
function CreateIndexForModelRequestFromJSONTyped(json, ignoreDiscriminator) {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'name': json['name'],
'cloud': json['cloud'],
'region': json['region'],
'deletionProtection': !(0, runtime_1.exists)(json, 'deletion_protection') ? undefined : (0, DeletionProtection_1.DeletionProtectionFromJSON)(json['deletion_protection']),
'tags': !(0, runtime_1.exists)(json, 'tags') ? undefined : json['tags'],
'embed': (0, CreateIndexForModelRequestEmbed_1.CreateIndexForModelRequestEmbedFromJSON)(json['embed']),
};
}
exports.CreateIndexForModelRequestFromJSONTyped = CreateIndexForModelRequestFromJSONTyped;
function CreateIndexForModelRequestToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'name': value.name,
'cloud': value.cloud,
'region': value.region,
'deletion_protection': (0, DeletionProtection_1.DeletionProtectionToJSON)(value.deletionProtection),
'tags': value.tags,
'embed': (0, CreateIndexForModelRequestEmbed_1.CreateIndexForModelRequestEmbedToJSON)(value.embed),
};
}
exports.CreateIndexForModelRequestToJSON = CreateIndexForModelRequestToJSON;
//# sourceMappingURL=CreateIndexForModelRequest.js.map