@indexea/sdk
Version:
Indexea JavaScript SDK (indexea.com)
84 lines (83 loc) • 4.05 kB
JavaScript
;
/* tslint:disable */
/* eslint-disable */
/**
* Indexea OpenAPI
* 这是 Indexea 搜索服务平台的 OpenAPI,用于描述平台的所有接口信息,你可以通过这个页面来了解和在线验证平台的所有接口信息。 ### Errors 本 API 使用标准的 HTTP 状态码来指示操作成功或者失败,如果失败将会在 body 中以 JSON 格式提供详细的错误信息,如下所示: ``` { \"error\": 404, \"message\": \"page not found\" } ```
*
* The version of the OpenAPI document: 1.0.0
* Contact: indexea.com@gmail.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.AppBeanToJSON = exports.AppBeanFromJSONTyped = exports.AppBeanFromJSON = exports.instanceOfAppBean = void 0;
var runtime_1 = require("../runtime");
var AppMentorBean_1 = require("./AppMentorBean");
/**
* Check if a given object implements the AppBean interface.
*/
function instanceOfAppBean(value) {
var isInstance = true;
return isInstance;
}
exports.instanceOfAppBean = instanceOfAppBean;
function AppBeanFromJSON(json) {
return AppBeanFromJSONTyped(json, false);
}
exports.AppBeanFromJSON = AppBeanFromJSON;
function AppBeanFromJSONTyped(json, ignoreDiscriminator) {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !(0, runtime_1.exists)(json, 'id') ? undefined : json['id'],
'account': !(0, runtime_1.exists)(json, 'account') ? undefined : json['account'],
'cluster': !(0, runtime_1.exists)(json, 'cluster') ? undefined : json['cluster'],
'name': !(0, runtime_1.exists)(json, 'name') ? undefined : json['name'],
'ident': !(0, runtime_1.exists)(json, 'ident') ? undefined : json['ident'],
'intro': !(0, runtime_1.exists)(json, 'intro') ? undefined : json['intro'],
'paid': !(0, runtime_1.exists)(json, 'paid') ? undefined : json['paid'],
'storage': !(0, runtime_1.exists)(json, 'storage') ? undefined : json['storage'],
'shards': !(0, runtime_1.exists)(json, 'shards') ? undefined : json['shards'],
'replicas': !(0, runtime_1.exists)(json, 'replicas') ? undefined : json['replicas'],
'searchs': !(0, runtime_1.exists)(json, 'searchs') ? undefined : json['searchs'],
'mentor': !(0, runtime_1.exists)(json, 'mentor') ? undefined : (0, AppMentorBean_1.AppMentorBeanFromJSON)(json['mentor']),
'settings': !(0, runtime_1.exists)(json, 'settings') ? undefined : json['settings'],
'indices': !(0, runtime_1.exists)(json, 'indices') ? undefined : json['indices'],
'createdAt': !(0, runtime_1.exists)(json, 'created_at') ? undefined : (new Date(json['created_at'])),
'expiredAt': !(0, runtime_1.exists)(json, 'expired_at') ? undefined : (new Date(json['expired_at'])),
'status': !(0, runtime_1.exists)(json, 'status') ? undefined : json['status'],
};
}
exports.AppBeanFromJSONTyped = AppBeanFromJSONTyped;
function AppBeanToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'id': value.id,
'account': value.account,
'cluster': value.cluster,
'name': value.name,
'ident': value.ident,
'intro': value.intro,
'paid': value.paid,
'storage': value.storage,
'shards': value.shards,
'replicas': value.replicas,
'searchs': value.searchs,
'mentor': (0, AppMentorBean_1.AppMentorBeanToJSON)(value.mentor),
'settings': value.settings,
'indices': value.indices,
'created_at': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
'expired_at': value.expiredAt === undefined ? undefined : (value.expiredAt.toISOString()),
'status': value.status,
};
}
exports.AppBeanToJSON = AppBeanToJSON;