UNPKG

@indexea/sdk

Version:

Indexea JavaScript SDK (indexea.com)

68 lines (67 loc) 1.94 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Indexea OpenAPI * OpenAPI of Indexea * * The version of the OpenAPI document: 1.0.0 * Contact: support@indexea.com * * 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.OptionFormToJSON = exports.OptionFormFromJSONTyped = exports.OptionFormFromJSON = exports.instanceOfOptionForm = exports.OptionFormTypeEnum = void 0; var runtime_1 = require("../runtime"); /** * @export */ exports.OptionFormTypeEnum = { Int: 'int', Bool: 'bool', String: 'string' }; /** * Check if a given object implements the OptionForm interface. */ function instanceOfOptionForm(value) { var isInstance = true; isInstance = isInstance && "key" in value; isInstance = isInstance && "type" in value; isInstance = isInstance && "value" in value; return isInstance; } exports.instanceOfOptionForm = instanceOfOptionForm; function OptionFormFromJSON(json) { return OptionFormFromJSONTyped(json, false); } exports.OptionFormFromJSON = OptionFormFromJSON; function OptionFormFromJSONTyped(json, ignoreDiscriminator) { if ((json === undefined) || (json === null)) { return json; } return { 'key': json['key'], 'type': json['type'], 'value': json['value'], 'vcode': !(0, runtime_1.exists)(json, 'vcode') ? undefined : json['vcode'], }; } exports.OptionFormFromJSONTyped = OptionFormFromJSONTyped; function OptionFormToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'key': value.key, 'type': value.type, 'value': value.value, 'vcode': value.vcode, }; } exports.OptionFormToJSON = OptionFormToJSON;