/** * This file is generated by the SwaggerTSGenerator. * Do not edit. */ /* tslint:disable */ import { BaseModel } from './base-model'; import { SubTypeFactory } from './sub-type-factory'; import { status } from './enums'; export interface IOrder { id?: number; petId?: number; quantity?: number; shipDate?: Date; status?: status; complete?: boolean; } export class Order extends BaseModel implements IOrder { static ID_FIELD_NAME = 'id'; static PET_ID_FIELD_NAME = 'petId'; static QUANTITY_FIELD_NAME = 'quantity'; static SHIP_DATE_FIELD_NAME = 'shipDate'; static STATUS_FIELD_NAME = 'status'; static COMPLETE_FIELD_NAME = 'complete'; id: number; petId: number; quantity: number; shipDate: Date; /** Order Status */ status: status; complete: boolean; /** * constructor * @param values Can be used to set a webapi response or formValues to this newly constructed model */ constructor(values?: Partial) { super(); if (values) { this.setValues(values); } } /** * set the values. * @param values Can be used to set a webapi response to this newly constructed model */ setValues(values: Partial): void { if (values) { const rawValues = values this.id = this.getValue(rawValues, Order.ID_FIELD_NAME); this.petId = this.getValue(rawValues, Order.PET_ID_FIELD_NAME); this.quantity = this.getValue(rawValues, Order.QUANTITY_FIELD_NAME); this.shipDate = this.getValue(rawValues, Order.SHIP_DATE_FIELD_NAME); this.status = this.getValue(rawValues, Order.STATUS_FIELD_NAME); this.complete = this.getValue(rawValues, Order.COMPLETE_FIELD_NAME); } } }