UNPKG

@indexea/sdk

Version:

Indexea JavaScript SDK (indexea.com)

201 lines (190 loc) 5.42 kB
/* 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. */ import { exists, mapValues } from '../runtime'; import type { AppMentorBean } from './AppMentorBean'; import { AppMentorBeanFromJSON, AppMentorBeanFromJSONTyped, AppMentorBeanToJSON, } from './AppMentorBean'; /** * 应用详情 * @export * @interface AppBean */ export interface AppBean { /** * * @type {number} * @memberof AppBean */ id?: number; /** * 创建者 * @type {number} * @memberof AppBean */ account?: number; /** * * @type {number} * @memberof AppBean */ cluster?: number; /** * * @type {string} * @memberof AppBean */ name?: string; /** * 应用唯一标识 * @type {string} * @memberof AppBean */ ident?: string; /** * * @type {string} * @memberof AppBean */ intro?: string; /** * 是否付费应用 * @type {boolean} * @memberof AppBean */ paid?: boolean; /** * 存储空间 * @type {number} * @memberof AppBean */ storage?: number; /** * 分片数 * @type {number} * @memberof AppBean */ shards?: number; /** * 副本数 * @type {number} * @memberof AppBean */ replicas?: number; /** * 搜索次数 * @type {number} * @memberof AppBean */ searchs?: number; /** * * @type {AppMentorBean} * @memberof AppBean */ mentor?: AppMentorBean; /** * 应用设置 * @type {object} * @memberof AppBean */ settings?: object; /** * 应用索引数 * @type {number} * @memberof AppBean */ indices?: number; /** * * @type {Date} * @memberof AppBean */ createdAt?: Date; /** * * @type {Date} * @memberof AppBean */ expiredAt?: Date; /** * * @type {number} * @memberof AppBean */ status?: number; } /** * Check if a given object implements the AppBean interface. */ export function instanceOfAppBean(value: object): boolean { let isInstance = true; return isInstance; } export function AppBeanFromJSON(json: any): AppBean { return AppBeanFromJSONTyped(json, false); } export function AppBeanFromJSONTyped(json: any, ignoreDiscriminator: boolean): AppBean { if ((json === undefined) || (json === null)) { return json; } return { 'id': !exists(json, 'id') ? undefined : json['id'], 'account': !exists(json, 'account') ? undefined : json['account'], 'cluster': !exists(json, 'cluster') ? undefined : json['cluster'], 'name': !exists(json, 'name') ? undefined : json['name'], 'ident': !exists(json, 'ident') ? undefined : json['ident'], 'intro': !exists(json, 'intro') ? undefined : json['intro'], 'paid': !exists(json, 'paid') ? undefined : json['paid'], 'storage': !exists(json, 'storage') ? undefined : json['storage'], 'shards': !exists(json, 'shards') ? undefined : json['shards'], 'replicas': !exists(json, 'replicas') ? undefined : json['replicas'], 'searchs': !exists(json, 'searchs') ? undefined : json['searchs'], 'mentor': !exists(json, 'mentor') ? undefined : AppMentorBeanFromJSON(json['mentor']), 'settings': !exists(json, 'settings') ? undefined : json['settings'], 'indices': !exists(json, 'indices') ? undefined : json['indices'], 'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])), 'expiredAt': !exists(json, 'expired_at') ? undefined : (new Date(json['expired_at'])), 'status': !exists(json, 'status') ? undefined : json['status'], }; } export function AppBeanToJSON(value?: AppBean | null): any { 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': 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, }; }