/** * This file is generated by the SwaggerTSGenerator. * Do not edit. */ /* tslint:disable */ import { BaseModel } from './base-model'; import { SubTypeFactory } from './sub-type-factory'; import { IAddress, Address } from './address.model'; export interface ICustomer { id?: number; username?: string; address?: Array; } export class Customer extends BaseModel implements ICustomer { static ID_FIELD_NAME = 'id'; static USERNAME_FIELD_NAME = 'username'; static ADDRESS_FIELD_NAME = 'address'; id: number; username: string; address: Array
; /** * constructor * @param values Can be used to set a webapi response or formValues to this newly constructed model */ constructor(values?: Partial) { super(); this.address = new Array
(); 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, Customer.ID_FIELD_NAME); this.username = this.getValue(rawValues, Customer.USERNAME_FIELD_NAME); this.fillModelArray(this, Customer.ADDRESS_FIELD_NAME, rawValues.address, Address, SubTypeFactory.createSubTypeInstance); } } }