UNPKG

@xompass/sdk-cloud-api

Version:

Xompass Client for cloud-api

218 lines (212 loc) 4.87 kB
import {ModelDefinition} from './BaseModels'; import {Log} from './Log'; declare var Object: any; export interface EndpointStatsInterface { hourInterval?: Date; count?: number; method?: string; execTime?: number; avgExecTime?: number; maxExecTime?: number; minExecTime?: number; contentLength?: number; avgContentLength?: number; maxContentLength?: number; minContentLength?: number; errorCount?: number; token?: string; tokenType?: string; customerId?: string; hostname?: string; taskname?: string; maxUploadTime?: number; minUploadTime?: number; avgUploadTime?: number; uploadTime?: number; uploadCount?: number; created?: Date; modified?: Date; deleted?: Date; id?: any; trackingLogs?: Log[]; } export class EndpointStats implements EndpointStatsInterface { hourInterval: Date; count: number; method: string; execTime: number; avgExecTime: number; maxExecTime: number; minExecTime: number; contentLength: number; avgContentLength: number; maxContentLength: number; minContentLength: number; errorCount: number; token: string; tokenType: string; customerId: string; hostname: string; taskname: string; maxUploadTime: number; minUploadTime: number; avgUploadTime: number; uploadTime: number; uploadCount: number; created: Date; modified: Date; deleted: Date; id: any; trackingLogs?: Log[]; constructor(data?: EndpointStatsInterface) { Object.assign(this, data); } /** * The name of the model represented by this $resource, * i.e. `EndpointStats`. */ public static getModelName(): string { return 'EndpointStats'; } /** * @method factory * @author Jonathan Casarrubias * @license MIT * This method creates an instance of EndpointStats for dynamic purposes. */ public static factory(data: EndpointStatsInterface): EndpointStats{ return new EndpointStats(data); } /** * @method getModelDefinition * @author Julien Ledun * @license MIT * This method returns an object that represents some of the model * definitions. */ public static getModelDefinition(): ModelDefinition { return { name: 'EndpointStats', plural: 'EndpointStats', path: 'EndpointStats', idName: 'id', properties: { hourInterval: { name: 'hourInterval', type: 'Date' }, count: { name: 'count', type: 'number' }, method: { name: 'method', type: 'string' }, execTime: { name: 'execTime', type: 'number' }, avgExecTime: { name: 'avgExecTime', type: 'number' }, maxExecTime: { name: 'maxExecTime', type: 'number' }, minExecTime: { name: 'minExecTime', type: 'number' }, contentLength: { name: 'contentLength', type: 'number' }, avgContentLength: { name: 'avgContentLength', type: 'number' }, maxContentLength: { name: 'maxContentLength', type: 'number' }, minContentLength: { name: 'minContentLength', type: 'number' }, errorCount: { name: 'errorCount', type: 'number' }, token: { name: 'token', type: 'string' }, tokenType: { name: 'tokenType', type: 'string' }, customerId: { name: 'customerId', type: 'string' }, hostname: { name: 'hostname', type: 'string' }, taskname: { name: 'taskname', type: 'string' }, maxUploadTime: { name: 'maxUploadTime', type: 'number' }, minUploadTime: { name: 'minUploadTime', type: 'number' }, avgUploadTime: { name: 'avgUploadTime', type: 'number' }, uploadTime: { name: 'uploadTime', type: 'number' }, uploadCount: { name: 'uploadCount', type: 'number' }, created: { name: 'created', type: 'Date' }, modified: { name: 'modified', type: 'Date' }, deleted: { name: 'deleted', type: 'Date', default: undefined }, id: { name: 'id', type: 'any' }, }, relations: { trackingLogs: { name: 'trackingLogs', type: 'Log[]', model: 'Log', relationType: 'hasMany', keyFrom: 'id', keyTo: 'trackingModelId' }, } }; } }