UNPKG

@pinecone-database/pinecone

Version:

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

66 lines 2.6 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.PodSpecToJSON = exports.PodSpecFromJSONTyped = exports.PodSpecFromJSON = exports.instanceOfPodSpec = void 0; const runtime_1 = require("../runtime"); const PodSpecMetadataConfig_1 = require("./PodSpecMetadataConfig"); /** * Check if a given object implements the PodSpec interface. */ function instanceOfPodSpec(value) { let isInstance = true; isInstance = isInstance && "environment" in value; isInstance = isInstance && "podType" in value; return isInstance; } exports.instanceOfPodSpec = instanceOfPodSpec; function PodSpecFromJSON(json) { return PodSpecFromJSONTyped(json, false); } exports.PodSpecFromJSON = PodSpecFromJSON; function PodSpecFromJSONTyped(json, ignoreDiscriminator) { if ((json === undefined) || (json === null)) { return json; } return { 'environment': json['environment'], 'replicas': !(0, runtime_1.exists)(json, 'replicas') ? undefined : json['replicas'], 'shards': !(0, runtime_1.exists)(json, 'shards') ? undefined : json['shards'], 'podType': json['pod_type'], 'pods': !(0, runtime_1.exists)(json, 'pods') ? undefined : json['pods'], 'metadataConfig': !(0, runtime_1.exists)(json, 'metadata_config') ? undefined : (0, PodSpecMetadataConfig_1.PodSpecMetadataConfigFromJSON)(json['metadata_config']), 'sourceCollection': !(0, runtime_1.exists)(json, 'source_collection') ? undefined : json['source_collection'], }; } exports.PodSpecFromJSONTyped = PodSpecFromJSONTyped; function PodSpecToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'environment': value.environment, 'replicas': value.replicas, 'shards': value.shards, 'pod_type': value.podType, 'pods': value.pods, 'metadata_config': (0, PodSpecMetadataConfig_1.PodSpecMetadataConfigToJSON)(value.metadataConfig), 'source_collection': value.sourceCollection, }; } exports.PodSpecToJSON = PodSpecToJSON; //# sourceMappingURL=PodSpec.js.map