UNPKG

@vectorize-io/vectorize-client

Version:
66 lines (65 loc) 2.42 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Vectorize API (Beta) * API for Vectorize services * * The version of the OpenAPI document: 0.0.1 * * * 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.instanceOfExtractionResult = instanceOfExtractionResult; exports.ExtractionResultFromJSON = ExtractionResultFromJSON; exports.ExtractionResultFromJSONTyped = ExtractionResultFromJSONTyped; exports.ExtractionResultToJSON = ExtractionResultToJSON; exports.ExtractionResultToJSONTyped = ExtractionResultToJSONTyped; /** * Check if a given object implements the ExtractionResult interface. */ function instanceOfExtractionResult(value) { if (!('success' in value) || value['success'] === undefined) return false; return true; } function ExtractionResultFromJSON(json) { return ExtractionResultFromJSONTyped(json, false); } function ExtractionResultFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'success': json['success'], 'chunks': json['chunks'] == null ? undefined : json['chunks'], 'text': json['text'] == null ? undefined : json['text'], 'metadata': json['metadata'] == null ? undefined : json['metadata'], 'metadataSchema': json['metadataSchema'] == null ? undefined : json['metadataSchema'], 'chunksMetadata': json['chunksMetadata'] == null ? undefined : json['chunksMetadata'], 'chunksSchema': json['chunksSchema'] == null ? undefined : json['chunksSchema'], 'error': json['error'] == null ? undefined : json['error'], }; } function ExtractionResultToJSON(json) { return ExtractionResultToJSONTyped(json, false); } function ExtractionResultToJSONTyped(value, ignoreDiscriminator) { if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; } if (value == null) { return value; } return { 'success': value['success'], 'chunks': value['chunks'], 'text': value['text'], 'metadata': value['metadata'], 'metadataSchema': value['metadataSchema'], 'chunksMetadata': value['chunksMetadata'], 'chunksSchema': value['chunksSchema'], 'error': value['error'], }; }