UNPKG

@xompass/sdk-cloud-api

Version:

Xompass Client for cloud-api

121 lines (115 loc) 2.67 kB
import {ModelDefinition} from './BaseModels'; import {Customer} from './Customer'; import {Log} from './Log'; declare var Object: any; export interface AWSRekognitionInterface { name: string; description?: string; options?: any; created?: Date; modified?: Date; deleted?: Date; id?: any; customerId?: any; customer?: Customer; trackingLogs?: Log[]; } export class AWSRekognition implements AWSRekognitionInterface { name: string; description: string; options: any; created: Date; modified: Date; deleted: Date; id: any; customerId: any; customer?: Customer; trackingLogs?: Log[]; constructor(data?: AWSRekognitionInterface) { Object.assign(this, data); } /** * The name of the model represented by this $resource, * i.e. `AWSRekognition`. */ public static getModelName(): string { return 'AWSRekognition'; } /** * @method factory * @author Jonathan Casarrubias * @license MIT * This method creates an instance of AWSRekognition for dynamic purposes. */ public static factory(data: AWSRekognitionInterface): AWSRekognition{ return new AWSRekognition(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: 'AWSRekognition', plural: 'AWSRekognitions', path: 'AWSRekognitions', idName: 'id', properties: { name: { name: 'name', type: 'string' }, description: { name: 'description', type: 'string' }, options: { name: 'options', type: 'any' }, created: { name: 'created', type: 'Date' }, modified: { name: 'modified', type: 'Date' }, deleted: { name: 'deleted', type: 'Date', default: undefined }, id: { name: 'id', type: 'any' }, customerId: { name: 'customerId', type: 'any' }, }, relations: { customer: { name: 'customer', type: 'Customer', model: 'Customer', relationType: 'belongsTo', keyFrom: 'customerId', keyTo: 'id' }, trackingLogs: { name: 'trackingLogs', type: 'Log[]', model: 'Log', relationType: 'hasMany', keyFrom: 'id', keyTo: 'trackingModelId' }, } }; } }